// 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.

/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
(function(global, factory) { /* global define, require, module */

    /* AMD */ if (typeof define === 'function' && define.amd)
        define(["protobufjs/minimal"], factory);

    /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports)
        module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal);

})(this, function($protobuf) {
    "use strict";

    // Common aliases
    var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
    
    // Exported root namespace
    var $root = $protobuf.roots._google_cloud_vision_protos || ($protobuf.roots._google_cloud_vision_protos = {});
    
    $root.google = (function() {
    
        /**
         * Namespace google.
         * @exports google
         * @namespace
         */
        var google = {};
    
        google.cloud = (function() {
    
            /**
             * Namespace cloud.
             * @memberof google
             * @namespace
             */
            var cloud = {};
    
            cloud.vision = (function() {
    
                /**
                 * Namespace vision.
                 * @memberof google.cloud
                 * @namespace
                 */
                var vision = {};
    
                vision.v1 = (function() {
    
                    /**
                     * Namespace v1.
                     * @memberof google.cloud.vision
                     * @namespace
                     */
                    var v1 = {};
    
                    v1.Vertex = (function() {
    
                        /**
                         * Properties of a Vertex.
                         * @memberof google.cloud.vision.v1
                         * @interface IVertex
                         * @property {number|null} [x] Vertex x
                         * @property {number|null} [y] Vertex y
                         */
    
                        /**
                         * Constructs a new Vertex.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Vertex.
                         * @implements IVertex
                         * @constructor
                         * @param {google.cloud.vision.v1.IVertex=} [properties] Properties to set
                         */
                        function Vertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Vertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1.Vertex
                         * @instance
                         */
                        Vertex.prototype.x = 0;
    
                        /**
                         * Vertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1.Vertex
                         * @instance
                         */
                        Vertex.prototype.y = 0;
    
                        /**
                         * Creates a new Vertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1.IVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Vertex} Vertex instance
                         */
                        Vertex.create = function create(properties) {
                            return new Vertex(properties);
                        };
    
                        /**
                         * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1.Vertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Vertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Vertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Vertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Vertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (!$util.isInteger(message.x))
                                    return "x: integer expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (!$util.isInteger(message.y))
                                    return "y: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Vertex} Vertex
                         */
                        Vertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Vertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Vertex();
                            if (object.x != null)
                                message.x = object.x | 0;
                            if (object.y != null)
                                message.y = object.y | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Vertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1.Vertex} message Vertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Vertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = message.y;
                            return object;
                        };
    
                        /**
                         * Converts this Vertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Vertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Vertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Vertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Vertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Vertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Vertex";
                        };
    
                        return Vertex;
                    })();
    
                    v1.NormalizedVertex = (function() {
    
                        /**
                         * Properties of a NormalizedVertex.
                         * @memberof google.cloud.vision.v1
                         * @interface INormalizedVertex
                         * @property {number|null} [x] NormalizedVertex x
                         * @property {number|null} [y] NormalizedVertex y
                         */
    
                        /**
                         * Constructs a new NormalizedVertex.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a NormalizedVertex.
                         * @implements INormalizedVertex
                         * @constructor
                         * @param {google.cloud.vision.v1.INormalizedVertex=} [properties] Properties to set
                         */
                        function NormalizedVertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * NormalizedVertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.x = 0;
    
                        /**
                         * NormalizedVertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.y = 0;
    
                        /**
                         * Creates a new NormalizedVertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1.INormalizedVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.NormalizedVertex} NormalizedVertex instance
                         */
                        NormalizedVertex.create = function create(properties) {
                            return new NormalizedVertex(properties);
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.vision.v1.NormalizedVertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1.NormalizedVertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.NormalizedVertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a NormalizedVertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        NormalizedVertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.NormalizedVertex} NormalizedVertex
                         */
                        NormalizedVertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.NormalizedVertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1.NormalizedVertex();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1.NormalizedVertex} message NormalizedVertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        NormalizedVertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            return object;
                        };
    
                        /**
                         * Converts this NormalizedVertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        NormalizedVertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for NormalizedVertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.NormalizedVertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        NormalizedVertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.NormalizedVertex";
                        };
    
                        return NormalizedVertex;
                    })();
    
                    v1.BoundingPoly = (function() {
    
                        /**
                         * Properties of a BoundingPoly.
                         * @memberof google.cloud.vision.v1
                         * @interface IBoundingPoly
                         * @property {Array.<google.cloud.vision.v1.IVertex>|null} [vertices] BoundingPoly vertices
                         * @property {Array.<google.cloud.vision.v1.INormalizedVertex>|null} [normalizedVertices] BoundingPoly normalizedVertices
                         */
    
                        /**
                         * Constructs a new BoundingPoly.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BoundingPoly.
                         * @implements IBoundingPoly
                         * @constructor
                         * @param {google.cloud.vision.v1.IBoundingPoly=} [properties] Properties to set
                         */
                        function BoundingPoly(properties) {
                            this.vertices = [];
                            this.normalizedVertices = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BoundingPoly vertices.
                         * @member {Array.<google.cloud.vision.v1.IVertex>} vertices
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.vertices = $util.emptyArray;
    
                        /**
                         * BoundingPoly normalizedVertices.
                         * @member {Array.<google.cloud.vision.v1.INormalizedVertex>} normalizedVertices
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.normalizedVertices = $util.emptyArray;
    
                        /**
                         * Creates a new BoundingPoly instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1.IBoundingPoly=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BoundingPoly} BoundingPoly instance
                         */
                        BoundingPoly.create = function create(properties) {
                            return new BoundingPoly(properties);
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1.BoundingPoly.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.vertices != null && message.vertices.length)
                                for (var i = 0; i < message.vertices.length; ++i)
                                    $root.google.cloud.vision.v1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.normalizedVertices != null && message.normalizedVertices.length)
                                for (var i = 0; i < message.normalizedVertices.length; ++i)
                                    $root.google.cloud.vision.v1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BoundingPoly.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BoundingPoly();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.vertices && message.vertices.length))
                                            message.vertices = [];
                                        message.vertices.push($root.google.cloud.vision.v1.Vertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.normalizedVertices && message.normalizedVertices.length))
                                            message.normalizedVertices = [];
                                        message.normalizedVertices.push($root.google.cloud.vision.v1.NormalizedVertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BoundingPoly message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BoundingPoly.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.vertices != null && message.hasOwnProperty("vertices")) {
                                if (!Array.isArray(message.vertices))
                                    return "vertices: array expected";
                                for (var i = 0; i < message.vertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Vertex.verify(message.vertices[i]);
                                    if (error)
                                        return "vertices." + error;
                                }
                            }
                            if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) {
                                if (!Array.isArray(message.normalizedVertices))
                                    return "normalizedVertices: array expected";
                                for (var i = 0; i < message.normalizedVertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.NormalizedVertex.verify(message.normalizedVertices[i]);
                                    if (error)
                                        return "normalizedVertices." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BoundingPoly} BoundingPoly
                         */
                        BoundingPoly.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BoundingPoly)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BoundingPoly();
                            if (object.vertices) {
                                if (!Array.isArray(object.vertices))
                                    throw TypeError(".google.cloud.vision.v1.BoundingPoly.vertices: array expected");
                                message.vertices = [];
                                for (var i = 0; i < object.vertices.length; ++i) {
                                    if (typeof object.vertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BoundingPoly.vertices: object expected");
                                    message.vertices[i] = $root.google.cloud.vision.v1.Vertex.fromObject(object.vertices[i]);
                                }
                            }
                            if (object.normalizedVertices) {
                                if (!Array.isArray(object.normalizedVertices))
                                    throw TypeError(".google.cloud.vision.v1.BoundingPoly.normalizedVertices: array expected");
                                message.normalizedVertices = [];
                                for (var i = 0; i < object.normalizedVertices.length; ++i) {
                                    if (typeof object.normalizedVertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BoundingPoly.normalizedVertices: object expected");
                                    message.normalizedVertices[i] = $root.google.cloud.vision.v1.NormalizedVertex.fromObject(object.normalizedVertices[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1.BoundingPoly} message BoundingPoly
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BoundingPoly.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.vertices = [];
                                object.normalizedVertices = [];
                            }
                            if (message.vertices && message.vertices.length) {
                                object.vertices = [];
                                for (var j = 0; j < message.vertices.length; ++j)
                                    object.vertices[j] = $root.google.cloud.vision.v1.Vertex.toObject(message.vertices[j], options);
                            }
                            if (message.normalizedVertices && message.normalizedVertices.length) {
                                object.normalizedVertices = [];
                                for (var j = 0; j < message.normalizedVertices.length; ++j)
                                    object.normalizedVertices[j] = $root.google.cloud.vision.v1.NormalizedVertex.toObject(message.normalizedVertices[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BoundingPoly to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BoundingPoly.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BoundingPoly
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BoundingPoly
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BoundingPoly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BoundingPoly";
                        };
    
                        return BoundingPoly;
                    })();
    
                    v1.Position = (function() {
    
                        /**
                         * Properties of a Position.
                         * @memberof google.cloud.vision.v1
                         * @interface IPosition
                         * @property {number|null} [x] Position x
                         * @property {number|null} [y] Position y
                         * @property {number|null} [z] Position z
                         */
    
                        /**
                         * Constructs a new Position.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Position.
                         * @implements IPosition
                         * @constructor
                         * @param {google.cloud.vision.v1.IPosition=} [properties] Properties to set
                         */
                        function Position(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Position x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1.Position
                         * @instance
                         */
                        Position.prototype.x = 0;
    
                        /**
                         * Position y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1.Position
                         * @instance
                         */
                        Position.prototype.y = 0;
    
                        /**
                         * Position z.
                         * @member {number} z
                         * @memberof google.cloud.vision.v1.Position
                         * @instance
                         */
                        Position.prototype.z = 0;
    
                        /**
                         * Creates a new Position instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {google.cloud.vision.v1.IPosition=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Position} Position instance
                         */
                        Position.create = function create(properties) {
                            return new Position(properties);
                        };
    
                        /**
                         * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1.Position.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {google.cloud.vision.v1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            if (message.z != null && Object.hasOwnProperty.call(message, "z"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.z);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Position.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {google.cloud.vision.v1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Position();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.z = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Position message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Position.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            if (message.z != null && message.hasOwnProperty("z"))
                                if (typeof message.z !== "number")
                                    return "z: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Position message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Position} Position
                         */
                        Position.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Position)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Position();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            if (object.z != null)
                                message.z = Number(object.z);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Position message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {google.cloud.vision.v1.Position} message Position
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Position.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                                object.z = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            if (message.z != null && message.hasOwnProperty("z"))
                                object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z;
                            return object;
                        };
    
                        /**
                         * Converts this Position to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Position
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Position.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Position
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Position
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Position";
                        };
    
                        return Position;
                    })();
    
                    v1.ImageAnnotator = (function() {
    
                        /**
                         * Constructs a new ImageAnnotator service.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImageAnnotator
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ImageAnnotator(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ImageAnnotator.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageAnnotator;
    
                        /**
                         * Creates new ImageAnnotator service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ImageAnnotator} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ImageAnnotator.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|batchAnnotateImages}.
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @typedef BatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.BatchAnnotateImagesResponse} [response] BatchAnnotateImagesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1.ImageAnnotator.BatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateImages = function batchAnnotateImages(request, callback) {
                            return this.rpcCall(batchAnnotateImages, $root.google.cloud.vision.v1.BatchAnnotateImagesRequest, $root.google.cloud.vision.v1.BatchAnnotateImagesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateImages" });
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.BatchAnnotateImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|batchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @typedef BatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.BatchAnnotateFilesResponse} [response] BatchAnnotateFilesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateFiles.
                         * @function batchAnnotateFiles
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest} request BatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1.ImageAnnotator.BatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateFilesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateFiles = function batchAnnotateFiles(request, callback) {
                            return this.rpcCall(batchAnnotateFiles, $root.google.cloud.vision.v1.BatchAnnotateFilesRequest, $root.google.cloud.vision.v1.BatchAnnotateFilesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateFiles" });
    
                        /**
                         * Calls BatchAnnotateFiles.
                         * @function batchAnnotateFiles
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest} request BatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.BatchAnnotateFilesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|asyncBatchAnnotateImages}.
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateImages.
                         * @function asyncBatchAnnotateImages
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest} request AsyncBatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateImages = function asyncBatchAnnotateImages(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateImages, $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateImages" });
    
                        /**
                         * Calls AsyncBatchAnnotateImages.
                         * @function asyncBatchAnnotateImages
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest} request AsyncBatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ImageAnnotator|asyncBatchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1.ImageAnnotator.AsyncBatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateFiles = function asyncBatchAnnotateFiles(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateFiles, $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateFiles" });
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ImageAnnotator;
                    })();
    
                    /**
                     * Likelihood enum.
                     * @name google.cloud.vision.v1.Likelihood
                     * @enum {number}
                     * @property {number} UNKNOWN=0 UNKNOWN value
                     * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value
                     * @property {number} UNLIKELY=2 UNLIKELY value
                     * @property {number} POSSIBLE=3 POSSIBLE value
                     * @property {number} LIKELY=4 LIKELY value
                     * @property {number} VERY_LIKELY=5 VERY_LIKELY value
                     */
                    v1.Likelihood = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNKNOWN"] = 0;
                        values[valuesById[1] = "VERY_UNLIKELY"] = 1;
                        values[valuesById[2] = "UNLIKELY"] = 2;
                        values[valuesById[3] = "POSSIBLE"] = 3;
                        values[valuesById[4] = "LIKELY"] = 4;
                        values[valuesById[5] = "VERY_LIKELY"] = 5;
                        return values;
                    })();
    
                    v1.Feature = (function() {
    
                        /**
                         * Properties of a Feature.
                         * @memberof google.cloud.vision.v1
                         * @interface IFeature
                         * @property {google.cloud.vision.v1.Feature.Type|null} [type] Feature type
                         * @property {number|null} [maxResults] Feature maxResults
                         * @property {string|null} [model] Feature model
                         */
    
                        /**
                         * Constructs a new Feature.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Feature.
                         * @implements IFeature
                         * @constructor
                         * @param {google.cloud.vision.v1.IFeature=} [properties] Properties to set
                         */
                        function Feature(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Feature type.
                         * @member {google.cloud.vision.v1.Feature.Type} type
                         * @memberof google.cloud.vision.v1.Feature
                         * @instance
                         */
                        Feature.prototype.type = 0;
    
                        /**
                         * Feature maxResults.
                         * @member {number} maxResults
                         * @memberof google.cloud.vision.v1.Feature
                         * @instance
                         */
                        Feature.prototype.maxResults = 0;
    
                        /**
                         * Feature model.
                         * @member {string} model
                         * @memberof google.cloud.vision.v1.Feature
                         * @instance
                         */
                        Feature.prototype.model = "";
    
                        /**
                         * Creates a new Feature instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {google.cloud.vision.v1.IFeature=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Feature} Feature instance
                         */
                        Feature.create = function create(properties) {
                            return new Feature(properties);
                        };
    
                        /**
                         * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1.Feature.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {google.cloud.vision.v1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                            if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults);
                            if (message.model != null && Object.hasOwnProperty.call(message, "model"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.model);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Feature.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {google.cloud.vision.v1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Feature();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.type = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.maxResults = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.model = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Feature message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Feature.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.type != null && message.hasOwnProperty("type"))
                                switch (message.type) {
                                default:
                                    return "type: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 11:
                                case 6:
                                case 7:
                                case 9:
                                case 10:
                                case 12:
                                case 19:
                                    break;
                                }
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                if (!$util.isInteger(message.maxResults))
                                    return "maxResults: integer expected";
                            if (message.model != null && message.hasOwnProperty("model"))
                                if (!$util.isString(message.model))
                                    return "model: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Feature message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Feature} Feature
                         */
                        Feature.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Feature)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Feature();
                            switch (object.type) {
                            default:
                                if (typeof object.type === "number") {
                                    message.type = object.type;
                                    break;
                                }
                                break;
                            case "TYPE_UNSPECIFIED":
                            case 0:
                                message.type = 0;
                                break;
                            case "FACE_DETECTION":
                            case 1:
                                message.type = 1;
                                break;
                            case "LANDMARK_DETECTION":
                            case 2:
                                message.type = 2;
                                break;
                            case "LOGO_DETECTION":
                            case 3:
                                message.type = 3;
                                break;
                            case "LABEL_DETECTION":
                            case 4:
                                message.type = 4;
                                break;
                            case "TEXT_DETECTION":
                            case 5:
                                message.type = 5;
                                break;
                            case "DOCUMENT_TEXT_DETECTION":
                            case 11:
                                message.type = 11;
                                break;
                            case "SAFE_SEARCH_DETECTION":
                            case 6:
                                message.type = 6;
                                break;
                            case "IMAGE_PROPERTIES":
                            case 7:
                                message.type = 7;
                                break;
                            case "CROP_HINTS":
                            case 9:
                                message.type = 9;
                                break;
                            case "WEB_DETECTION":
                            case 10:
                                message.type = 10;
                                break;
                            case "PRODUCT_SEARCH":
                            case 12:
                                message.type = 12;
                                break;
                            case "OBJECT_LOCALIZATION":
                            case 19:
                                message.type = 19;
                                break;
                            }
                            if (object.maxResults != null)
                                message.maxResults = object.maxResults | 0;
                            if (object.model != null)
                                message.model = String(object.model);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Feature message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {google.cloud.vision.v1.Feature} message Feature
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Feature.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
                                object.maxResults = 0;
                                object.model = "";
                            }
                            if (message.type != null && message.hasOwnProperty("type"))
                                object.type = options.enums === String ? $root.google.cloud.vision.v1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.Feature.Type[message.type] : message.type;
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                object.maxResults = message.maxResults;
                            if (message.model != null && message.hasOwnProperty("model"))
                                object.model = message.model;
                            return object;
                        };
    
                        /**
                         * Converts this Feature to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Feature
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Feature.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Feature
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Feature
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Feature.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Feature";
                        };
    
                        /**
                         * Type enum.
                         * @name google.cloud.vision.v1.Feature.Type
                         * @enum {number}
                         * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
                         * @property {number} FACE_DETECTION=1 FACE_DETECTION value
                         * @property {number} LANDMARK_DETECTION=2 LANDMARK_DETECTION value
                         * @property {number} LOGO_DETECTION=3 LOGO_DETECTION value
                         * @property {number} LABEL_DETECTION=4 LABEL_DETECTION value
                         * @property {number} TEXT_DETECTION=5 TEXT_DETECTION value
                         * @property {number} DOCUMENT_TEXT_DETECTION=11 DOCUMENT_TEXT_DETECTION value
                         * @property {number} SAFE_SEARCH_DETECTION=6 SAFE_SEARCH_DETECTION value
                         * @property {number} IMAGE_PROPERTIES=7 IMAGE_PROPERTIES value
                         * @property {number} CROP_HINTS=9 CROP_HINTS value
                         * @property {number} WEB_DETECTION=10 WEB_DETECTION value
                         * @property {number} PRODUCT_SEARCH=12 PRODUCT_SEARCH value
                         * @property {number} OBJECT_LOCALIZATION=19 OBJECT_LOCALIZATION value
                         */
                        Feature.Type = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "FACE_DETECTION"] = 1;
                            values[valuesById[2] = "LANDMARK_DETECTION"] = 2;
                            values[valuesById[3] = "LOGO_DETECTION"] = 3;
                            values[valuesById[4] = "LABEL_DETECTION"] = 4;
                            values[valuesById[5] = "TEXT_DETECTION"] = 5;
                            values[valuesById[11] = "DOCUMENT_TEXT_DETECTION"] = 11;
                            values[valuesById[6] = "SAFE_SEARCH_DETECTION"] = 6;
                            values[valuesById[7] = "IMAGE_PROPERTIES"] = 7;
                            values[valuesById[9] = "CROP_HINTS"] = 9;
                            values[valuesById[10] = "WEB_DETECTION"] = 10;
                            values[valuesById[12] = "PRODUCT_SEARCH"] = 12;
                            values[valuesById[19] = "OBJECT_LOCALIZATION"] = 19;
                            return values;
                        })();
    
                        return Feature;
                    })();
    
                    v1.ImageSource = (function() {
    
                        /**
                         * Properties of an ImageSource.
                         * @memberof google.cloud.vision.v1
                         * @interface IImageSource
                         * @property {string|null} [gcsImageUri] ImageSource gcsImageUri
                         * @property {string|null} [imageUri] ImageSource imageUri
                         */
    
                        /**
                         * Constructs a new ImageSource.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImageSource.
                         * @implements IImageSource
                         * @constructor
                         * @param {google.cloud.vision.v1.IImageSource=} [properties] Properties to set
                         */
                        function ImageSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageSource gcsImageUri.
                         * @member {string} gcsImageUri
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.gcsImageUri = "";
    
                        /**
                         * ImageSource imageUri.
                         * @member {string} imageUri
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.imageUri = "";
    
                        /**
                         * Creates a new ImageSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1.IImageSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImageSource} ImageSource instance
                         */
                        ImageSource.create = function create(properties) {
                            return new ImageSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1.ImageSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsImageUri != null && Object.hasOwnProperty.call(message, "gcsImageUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsImageUri);
                            if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImageSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImageSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsImageUri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.imageUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                if (!$util.isString(message.gcsImageUri))
                                    return "gcsImageUri: string expected";
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                if (!$util.isString(message.imageUri))
                                    return "imageUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImageSource} ImageSource
                         */
                        ImageSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImageSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImageSource();
                            if (object.gcsImageUri != null)
                                message.gcsImageUri = String(object.gcsImageUri);
                            if (object.imageUri != null)
                                message.imageUri = String(object.imageUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1.ImageSource} message ImageSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsImageUri = "";
                                object.imageUri = "";
                            }
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                object.gcsImageUri = message.gcsImageUri;
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                object.imageUri = message.imageUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImageSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImageSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImageSource";
                        };
    
                        return ImageSource;
                    })();
    
                    v1.Image = (function() {
    
                        /**
                         * Properties of an Image.
                         * @memberof google.cloud.vision.v1
                         * @interface IImage
                         * @property {Uint8Array|null} [content] Image content
                         * @property {google.cloud.vision.v1.IImageSource|null} [source] Image source
                         */
    
                        /**
                         * Constructs a new Image.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an Image.
                         * @implements IImage
                         * @constructor
                         * @param {google.cloud.vision.v1.IImage=} [properties] Properties to set
                         */
                        function Image(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Image content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1.Image
                         * @instance
                         */
                        Image.prototype.content = $util.newBuffer([]);
    
                        /**
                         * Image source.
                         * @member {google.cloud.vision.v1.IImageSource|null|undefined} source
                         * @memberof google.cloud.vision.v1.Image
                         * @instance
                         */
                        Image.prototype.source = null;
    
                        /**
                         * Creates a new Image instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {google.cloud.vision.v1.IImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Image} Image instance
                         */
                        Image.create = function create(properties) {
                            return new Image(properties);
                        };
    
                        /**
                         * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1.Image.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {google.cloud.vision.v1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
                            if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                                $root.google.cloud.vision.v1.ImageSource.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Image.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {google.cloud.vision.v1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Image();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.source = $root.google.cloud.vision.v1.ImageSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an Image message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Image.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.source != null && message.hasOwnProperty("source")) {
                                var error = $root.google.cloud.vision.v1.ImageSource.verify(message.source);
                                if (error)
                                    return "source." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an Image message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Image} Image
                         */
                        Image.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Image)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Image();
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.source != null) {
                                if (typeof object.source !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Image.source: object expected");
                                message.source = $root.google.cloud.vision.v1.ImageSource.fromObject(object.source);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an Image message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {google.cloud.vision.v1.Image} message Image
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Image.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                                object.source = null;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            if (message.source != null && message.hasOwnProperty("source"))
                                object.source = $root.google.cloud.vision.v1.ImageSource.toObject(message.source, options);
                            return object;
                        };
    
                        /**
                         * Converts this Image to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Image
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Image.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Image
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Image
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Image";
                        };
    
                        return Image;
                    })();
    
                    v1.FaceAnnotation = (function() {
    
                        /**
                         * Properties of a FaceAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface IFaceAnnotation
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] FaceAnnotation boundingPoly
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [fdBoundingPoly] FaceAnnotation fdBoundingPoly
                         * @property {Array.<google.cloud.vision.v1.FaceAnnotation.ILandmark>|null} [landmarks] FaceAnnotation landmarks
                         * @property {number|null} [rollAngle] FaceAnnotation rollAngle
                         * @property {number|null} [panAngle] FaceAnnotation panAngle
                         * @property {number|null} [tiltAngle] FaceAnnotation tiltAngle
                         * @property {number|null} [detectionConfidence] FaceAnnotation detectionConfidence
                         * @property {number|null} [landmarkingConfidence] FaceAnnotation landmarkingConfidence
                         * @property {google.cloud.vision.v1.Likelihood|null} [joyLikelihood] FaceAnnotation joyLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [sorrowLikelihood] FaceAnnotation sorrowLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [angerLikelihood] FaceAnnotation angerLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [surpriseLikelihood] FaceAnnotation surpriseLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [underExposedLikelihood] FaceAnnotation underExposedLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [blurredLikelihood] FaceAnnotation blurredLikelihood
                         * @property {google.cloud.vision.v1.Likelihood|null} [headwearLikelihood] FaceAnnotation headwearLikelihood
                         */
    
                        /**
                         * Constructs a new FaceAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a FaceAnnotation.
                         * @implements IFaceAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.IFaceAnnotation=} [properties] Properties to set
                         */
                        function FaceAnnotation(properties) {
                            this.landmarks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * FaceAnnotation fdBoundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} fdBoundingPoly
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.fdBoundingPoly = null;
    
                        /**
                         * FaceAnnotation landmarks.
                         * @member {Array.<google.cloud.vision.v1.FaceAnnotation.ILandmark>} landmarks
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarks = $util.emptyArray;
    
                        /**
                         * FaceAnnotation rollAngle.
                         * @member {number} rollAngle
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.rollAngle = 0;
    
                        /**
                         * FaceAnnotation panAngle.
                         * @member {number} panAngle
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.panAngle = 0;
    
                        /**
                         * FaceAnnotation tiltAngle.
                         * @member {number} tiltAngle
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.tiltAngle = 0;
    
                        /**
                         * FaceAnnotation detectionConfidence.
                         * @member {number} detectionConfidence
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.detectionConfidence = 0;
    
                        /**
                         * FaceAnnotation landmarkingConfidence.
                         * @member {number} landmarkingConfidence
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarkingConfidence = 0;
    
                        /**
                         * FaceAnnotation joyLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} joyLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.joyLikelihood = 0;
    
                        /**
                         * FaceAnnotation sorrowLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} sorrowLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.sorrowLikelihood = 0;
    
                        /**
                         * FaceAnnotation angerLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} angerLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.angerLikelihood = 0;
    
                        /**
                         * FaceAnnotation surpriseLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} surpriseLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.surpriseLikelihood = 0;
    
                        /**
                         * FaceAnnotation underExposedLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} underExposedLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.underExposedLikelihood = 0;
    
                        /**
                         * FaceAnnotation blurredLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} blurredLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.blurredLikelihood = 0;
    
                        /**
                         * FaceAnnotation headwearLikelihood.
                         * @member {google.cloud.vision.v1.Likelihood} headwearLikelihood
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.headwearLikelihood = 0;
    
                        /**
                         * Creates a new FaceAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IFaceAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.FaceAnnotation} FaceAnnotation instance
                         */
                        FaceAnnotation.create = function create(properties) {
                            return new FaceAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message. Does not implicitly {@link google.cloud.vision.v1.FaceAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fdBoundingPoly != null && Object.hasOwnProperty.call(message, "fdBoundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.fdBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.landmarks != null && message.landmarks.length)
                                for (var i = 0; i < message.landmarks.length; ++i)
                                    $root.google.cloud.vision.v1.FaceAnnotation.Landmark.encode(message.landmarks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.rollAngle != null && Object.hasOwnProperty.call(message, "rollAngle"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.rollAngle);
                            if (message.panAngle != null && Object.hasOwnProperty.call(message, "panAngle"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.panAngle);
                            if (message.tiltAngle != null && Object.hasOwnProperty.call(message, "tiltAngle"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.tiltAngle);
                            if (message.detectionConfidence != null && Object.hasOwnProperty.call(message, "detectionConfidence"))
                                writer.uint32(/* id 7, wireType 5 =*/61).float(message.detectionConfidence);
                            if (message.landmarkingConfidence != null && Object.hasOwnProperty.call(message, "landmarkingConfidence"))
                                writer.uint32(/* id 8, wireType 5 =*/69).float(message.landmarkingConfidence);
                            if (message.joyLikelihood != null && Object.hasOwnProperty.call(message, "joyLikelihood"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.joyLikelihood);
                            if (message.sorrowLikelihood != null && Object.hasOwnProperty.call(message, "sorrowLikelihood"))
                                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.sorrowLikelihood);
                            if (message.angerLikelihood != null && Object.hasOwnProperty.call(message, "angerLikelihood"))
                                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.angerLikelihood);
                            if (message.surpriseLikelihood != null && Object.hasOwnProperty.call(message, "surpriseLikelihood"))
                                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.surpriseLikelihood);
                            if (message.underExposedLikelihood != null && Object.hasOwnProperty.call(message, "underExposedLikelihood"))
                                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.underExposedLikelihood);
                            if (message.blurredLikelihood != null && Object.hasOwnProperty.call(message, "blurredLikelihood"))
                                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.blurredLikelihood);
                            if (message.headwearLikelihood != null && Object.hasOwnProperty.call(message, "headwearLikelihood"))
                                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.headwearLikelihood);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.FaceAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.FaceAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.fdBoundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.landmarks && message.landmarks.length))
                                            message.landmarks = [];
                                        message.landmarks.push($root.google.cloud.vision.v1.FaceAnnotation.Landmark.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.rollAngle = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.panAngle = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.tiltAngle = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.detectionConfidence = reader.float();
                                        break;
                                    }
                                case 8: {
                                        message.landmarkingConfidence = reader.float();
                                        break;
                                    }
                                case 9: {
                                        message.joyLikelihood = reader.int32();
                                        break;
                                    }
                                case 10: {
                                        message.sorrowLikelihood = reader.int32();
                                        break;
                                    }
                                case 11: {
                                        message.angerLikelihood = reader.int32();
                                        break;
                                    }
                                case 12: {
                                        message.surpriseLikelihood = reader.int32();
                                        break;
                                    }
                                case 13: {
                                        message.underExposedLikelihood = reader.int32();
                                        break;
                                    }
                                case 14: {
                                        message.blurredLikelihood = reader.int32();
                                        break;
                                    }
                                case 15: {
                                        message.headwearLikelihood = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.fdBoundingPoly);
                                if (error)
                                    return "fdBoundingPoly." + error;
                            }
                            if (message.landmarks != null && message.hasOwnProperty("landmarks")) {
                                if (!Array.isArray(message.landmarks))
                                    return "landmarks: array expected";
                                for (var i = 0; i < message.landmarks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.FaceAnnotation.Landmark.verify(message.landmarks[i]);
                                    if (error)
                                        return "landmarks." + error;
                                }
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                if (typeof message.rollAngle !== "number")
                                    return "rollAngle: number expected";
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                if (typeof message.panAngle !== "number")
                                    return "panAngle: number expected";
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                if (typeof message.tiltAngle !== "number")
                                    return "tiltAngle: number expected";
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                if (typeof message.detectionConfidence !== "number")
                                    return "detectionConfidence: number expected";
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                if (typeof message.landmarkingConfidence !== "number")
                                    return "landmarkingConfidence: number expected";
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                switch (message.joyLikelihood) {
                                default:
                                    return "joyLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                switch (message.sorrowLikelihood) {
                                default:
                                    return "sorrowLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                switch (message.angerLikelihood) {
                                default:
                                    return "angerLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                switch (message.surpriseLikelihood) {
                                default:
                                    return "surpriseLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                switch (message.underExposedLikelihood) {
                                default:
                                    return "underExposedLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                switch (message.blurredLikelihood) {
                                default:
                                    return "blurredLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                switch (message.headwearLikelihood) {
                                default:
                                    return "headwearLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a FaceAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.FaceAnnotation} FaceAnnotation
                         */
                        FaceAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.FaceAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.FaceAnnotation();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.FaceAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.fdBoundingPoly != null) {
                                if (typeof object.fdBoundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.FaceAnnotation.fdBoundingPoly: object expected");
                                message.fdBoundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.fdBoundingPoly);
                            }
                            if (object.landmarks) {
                                if (!Array.isArray(object.landmarks))
                                    throw TypeError(".google.cloud.vision.v1.FaceAnnotation.landmarks: array expected");
                                message.landmarks = [];
                                for (var i = 0; i < object.landmarks.length; ++i) {
                                    if (typeof object.landmarks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.FaceAnnotation.landmarks: object expected");
                                    message.landmarks[i] = $root.google.cloud.vision.v1.FaceAnnotation.Landmark.fromObject(object.landmarks[i]);
                                }
                            }
                            if (object.rollAngle != null)
                                message.rollAngle = Number(object.rollAngle);
                            if (object.panAngle != null)
                                message.panAngle = Number(object.panAngle);
                            if (object.tiltAngle != null)
                                message.tiltAngle = Number(object.tiltAngle);
                            if (object.detectionConfidence != null)
                                message.detectionConfidence = Number(object.detectionConfidence);
                            if (object.landmarkingConfidence != null)
                                message.landmarkingConfidence = Number(object.landmarkingConfidence);
                            switch (object.joyLikelihood) {
                            default:
                                if (typeof object.joyLikelihood === "number") {
                                    message.joyLikelihood = object.joyLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.joyLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.joyLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.joyLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.joyLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.joyLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.joyLikelihood = 5;
                                break;
                            }
                            switch (object.sorrowLikelihood) {
                            default:
                                if (typeof object.sorrowLikelihood === "number") {
                                    message.sorrowLikelihood = object.sorrowLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.sorrowLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.sorrowLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.sorrowLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.sorrowLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.sorrowLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.sorrowLikelihood = 5;
                                break;
                            }
                            switch (object.angerLikelihood) {
                            default:
                                if (typeof object.angerLikelihood === "number") {
                                    message.angerLikelihood = object.angerLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.angerLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.angerLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.angerLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.angerLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.angerLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.angerLikelihood = 5;
                                break;
                            }
                            switch (object.surpriseLikelihood) {
                            default:
                                if (typeof object.surpriseLikelihood === "number") {
                                    message.surpriseLikelihood = object.surpriseLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.surpriseLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.surpriseLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.surpriseLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.surpriseLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.surpriseLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.surpriseLikelihood = 5;
                                break;
                            }
                            switch (object.underExposedLikelihood) {
                            default:
                                if (typeof object.underExposedLikelihood === "number") {
                                    message.underExposedLikelihood = object.underExposedLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.underExposedLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.underExposedLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.underExposedLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.underExposedLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.underExposedLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.underExposedLikelihood = 5;
                                break;
                            }
                            switch (object.blurredLikelihood) {
                            default:
                                if (typeof object.blurredLikelihood === "number") {
                                    message.blurredLikelihood = object.blurredLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blurredLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.blurredLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.blurredLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.blurredLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.blurredLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.blurredLikelihood = 5;
                                break;
                            }
                            switch (object.headwearLikelihood) {
                            default:
                                if (typeof object.headwearLikelihood === "number") {
                                    message.headwearLikelihood = object.headwearLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.headwearLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.headwearLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.headwearLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.headwearLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.headwearLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.headwearLikelihood = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.FaceAnnotation} message FaceAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.landmarks = [];
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.fdBoundingPoly = null;
                                object.rollAngle = 0;
                                object.panAngle = 0;
                                object.tiltAngle = 0;
                                object.detectionConfidence = 0;
                                object.landmarkingConfidence = 0;
                                object.joyLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.sorrowLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.angerLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.surpriseLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.underExposedLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.blurredLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.headwearLikelihood = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly"))
                                object.fdBoundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.fdBoundingPoly, options);
                            if (message.landmarks && message.landmarks.length) {
                                object.landmarks = [];
                                for (var j = 0; j < message.landmarks.length; ++j)
                                    object.landmarks[j] = $root.google.cloud.vision.v1.FaceAnnotation.Landmark.toObject(message.landmarks[j], options);
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                object.rollAngle = options.json && !isFinite(message.rollAngle) ? String(message.rollAngle) : message.rollAngle;
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                object.panAngle = options.json && !isFinite(message.panAngle) ? String(message.panAngle) : message.panAngle;
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                object.tiltAngle = options.json && !isFinite(message.tiltAngle) ? String(message.tiltAngle) : message.tiltAngle;
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                object.detectionConfidence = options.json && !isFinite(message.detectionConfidence) ? String(message.detectionConfidence) : message.detectionConfidence;
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence;
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1.Likelihood[message.joyLikelihood] : message.joyLikelihood;
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood;
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1.Likelihood[message.angerLikelihood] : message.angerLikelihood;
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood;
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood;
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood;
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood;
                            return object;
                        };
    
                        /**
                         * Converts this FaceAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.FaceAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.FaceAnnotation";
                        };
    
                        FaceAnnotation.Landmark = (function() {
    
                            /**
                             * Properties of a Landmark.
                             * @memberof google.cloud.vision.v1.FaceAnnotation
                             * @interface ILandmark
                             * @property {google.cloud.vision.v1.FaceAnnotation.Landmark.Type|null} [type] Landmark type
                             * @property {google.cloud.vision.v1.IPosition|null} [position] Landmark position
                             */
    
                            /**
                             * Constructs a new Landmark.
                             * @memberof google.cloud.vision.v1.FaceAnnotation
                             * @classdesc Represents a Landmark.
                             * @implements ILandmark
                             * @constructor
                             * @param {google.cloud.vision.v1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             */
                            function Landmark(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Landmark type.
                             * @member {google.cloud.vision.v1.FaceAnnotation.Landmark.Type} type
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.type = 0;
    
                            /**
                             * Landmark position.
                             * @member {google.cloud.vision.v1.IPosition|null|undefined} position
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.position = null;
    
                            /**
                             * Creates a new Landmark instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.FaceAnnotation.Landmark} Landmark instance
                             */
                            Landmark.create = function create(properties) {
                                return new Landmark(properties);
                            };
    
                            /**
                             * Encodes the specified Landmark message. Does not implicitly {@link google.cloud.vision.v1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                                if (message.position != null && Object.hasOwnProperty.call(message, "position"))
                                    $root.google.cloud.vision.v1.Position.encode(message.position, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Landmark message, length delimited. Does not implicitly {@link google.cloud.vision.v1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.FaceAnnotation.Landmark();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 3: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 4: {
                                            message.position = $root.google.cloud.vision.v1.Position.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Landmark message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Landmark.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case 6:
                                    case 7:
                                    case 8:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                    case 33:
                                    case 34:
                                    case 35:
                                    case 36:
                                        break;
                                    }
                                if (message.position != null && message.hasOwnProperty("position")) {
                                    var error = $root.google.cloud.vision.v1.Position.verify(message.position);
                                    if (error)
                                        return "position." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a Landmark message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.FaceAnnotation.Landmark} Landmark
                             */
                            Landmark.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.FaceAnnotation.Landmark)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.FaceAnnotation.Landmark();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN_LANDMARK":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "LEFT_EYE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "RIGHT_EYE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "LEFT_OF_LEFT_EYEBROW":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "RIGHT_OF_LEFT_EYEBROW":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LEFT_OF_RIGHT_EYEBROW":
                                case 5:
                                    message.type = 5;
                                    break;
                                case "RIGHT_OF_RIGHT_EYEBROW":
                                case 6:
                                    message.type = 6;
                                    break;
                                case "MIDPOINT_BETWEEN_EYES":
                                case 7:
                                    message.type = 7;
                                    break;
                                case "NOSE_TIP":
                                case 8:
                                    message.type = 8;
                                    break;
                                case "UPPER_LIP":
                                case 9:
                                    message.type = 9;
                                    break;
                                case "LOWER_LIP":
                                case 10:
                                    message.type = 10;
                                    break;
                                case "MOUTH_LEFT":
                                case 11:
                                    message.type = 11;
                                    break;
                                case "MOUTH_RIGHT":
                                case 12:
                                    message.type = 12;
                                    break;
                                case "MOUTH_CENTER":
                                case 13:
                                    message.type = 13;
                                    break;
                                case "NOSE_BOTTOM_RIGHT":
                                case 14:
                                    message.type = 14;
                                    break;
                                case "NOSE_BOTTOM_LEFT":
                                case 15:
                                    message.type = 15;
                                    break;
                                case "NOSE_BOTTOM_CENTER":
                                case 16:
                                    message.type = 16;
                                    break;
                                case "LEFT_EYE_TOP_BOUNDARY":
                                case 17:
                                    message.type = 17;
                                    break;
                                case "LEFT_EYE_RIGHT_CORNER":
                                case 18:
                                    message.type = 18;
                                    break;
                                case "LEFT_EYE_BOTTOM_BOUNDARY":
                                case 19:
                                    message.type = 19;
                                    break;
                                case "LEFT_EYE_LEFT_CORNER":
                                case 20:
                                    message.type = 20;
                                    break;
                                case "RIGHT_EYE_TOP_BOUNDARY":
                                case 21:
                                    message.type = 21;
                                    break;
                                case "RIGHT_EYE_RIGHT_CORNER":
                                case 22:
                                    message.type = 22;
                                    break;
                                case "RIGHT_EYE_BOTTOM_BOUNDARY":
                                case 23:
                                    message.type = 23;
                                    break;
                                case "RIGHT_EYE_LEFT_CORNER":
                                case 24:
                                    message.type = 24;
                                    break;
                                case "LEFT_EYEBROW_UPPER_MIDPOINT":
                                case 25:
                                    message.type = 25;
                                    break;
                                case "RIGHT_EYEBROW_UPPER_MIDPOINT":
                                case 26:
                                    message.type = 26;
                                    break;
                                case "LEFT_EAR_TRAGION":
                                case 27:
                                    message.type = 27;
                                    break;
                                case "RIGHT_EAR_TRAGION":
                                case 28:
                                    message.type = 28;
                                    break;
                                case "LEFT_EYE_PUPIL":
                                case 29:
                                    message.type = 29;
                                    break;
                                case "RIGHT_EYE_PUPIL":
                                case 30:
                                    message.type = 30;
                                    break;
                                case "FOREHEAD_GLABELLA":
                                case 31:
                                    message.type = 31;
                                    break;
                                case "CHIN_GNATHION":
                                case 32:
                                    message.type = 32;
                                    break;
                                case "CHIN_LEFT_GONION":
                                case 33:
                                    message.type = 33;
                                    break;
                                case "CHIN_RIGHT_GONION":
                                case 34:
                                    message.type = 34;
                                    break;
                                case "LEFT_CHEEK_CENTER":
                                case 35:
                                    message.type = 35;
                                    break;
                                case "RIGHT_CHEEK_CENTER":
                                case 36:
                                    message.type = 36;
                                    break;
                                }
                                if (object.position != null) {
                                    if (typeof object.position !== "object")
                                        throw TypeError(".google.cloud.vision.v1.FaceAnnotation.Landmark.position: object expected");
                                    message.position = $root.google.cloud.vision.v1.Position.fromObject(object.position);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Landmark message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1.FaceAnnotation.Landmark} message Landmark
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Landmark.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN_LANDMARK" : 0;
                                    object.position = null;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.FaceAnnotation.Landmark.Type[message.type] : message.type;
                                if (message.position != null && message.hasOwnProperty("position"))
                                    object.position = $root.google.cloud.vision.v1.Position.toObject(message.position, options);
                                return object;
                            };
    
                            /**
                             * Converts this Landmark to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Landmark.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Landmark
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.FaceAnnotation.Landmark
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Landmark.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.FaceAnnotation.Landmark";
                            };
    
                            /**
                             * Type enum.
                             * @name google.cloud.vision.v1.FaceAnnotation.Landmark.Type
                             * @enum {number}
                             * @property {number} UNKNOWN_LANDMARK=0 UNKNOWN_LANDMARK value
                             * @property {number} LEFT_EYE=1 LEFT_EYE value
                             * @property {number} RIGHT_EYE=2 RIGHT_EYE value
                             * @property {number} LEFT_OF_LEFT_EYEBROW=3 LEFT_OF_LEFT_EYEBROW value
                             * @property {number} RIGHT_OF_LEFT_EYEBROW=4 RIGHT_OF_LEFT_EYEBROW value
                             * @property {number} LEFT_OF_RIGHT_EYEBROW=5 LEFT_OF_RIGHT_EYEBROW value
                             * @property {number} RIGHT_OF_RIGHT_EYEBROW=6 RIGHT_OF_RIGHT_EYEBROW value
                             * @property {number} MIDPOINT_BETWEEN_EYES=7 MIDPOINT_BETWEEN_EYES value
                             * @property {number} NOSE_TIP=8 NOSE_TIP value
                             * @property {number} UPPER_LIP=9 UPPER_LIP value
                             * @property {number} LOWER_LIP=10 LOWER_LIP value
                             * @property {number} MOUTH_LEFT=11 MOUTH_LEFT value
                             * @property {number} MOUTH_RIGHT=12 MOUTH_RIGHT value
                             * @property {number} MOUTH_CENTER=13 MOUTH_CENTER value
                             * @property {number} NOSE_BOTTOM_RIGHT=14 NOSE_BOTTOM_RIGHT value
                             * @property {number} NOSE_BOTTOM_LEFT=15 NOSE_BOTTOM_LEFT value
                             * @property {number} NOSE_BOTTOM_CENTER=16 NOSE_BOTTOM_CENTER value
                             * @property {number} LEFT_EYE_TOP_BOUNDARY=17 LEFT_EYE_TOP_BOUNDARY value
                             * @property {number} LEFT_EYE_RIGHT_CORNER=18 LEFT_EYE_RIGHT_CORNER value
                             * @property {number} LEFT_EYE_BOTTOM_BOUNDARY=19 LEFT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} LEFT_EYE_LEFT_CORNER=20 LEFT_EYE_LEFT_CORNER value
                             * @property {number} RIGHT_EYE_TOP_BOUNDARY=21 RIGHT_EYE_TOP_BOUNDARY value
                             * @property {number} RIGHT_EYE_RIGHT_CORNER=22 RIGHT_EYE_RIGHT_CORNER value
                             * @property {number} RIGHT_EYE_BOTTOM_BOUNDARY=23 RIGHT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} RIGHT_EYE_LEFT_CORNER=24 RIGHT_EYE_LEFT_CORNER value
                             * @property {number} LEFT_EYEBROW_UPPER_MIDPOINT=25 LEFT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} RIGHT_EYEBROW_UPPER_MIDPOINT=26 RIGHT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} LEFT_EAR_TRAGION=27 LEFT_EAR_TRAGION value
                             * @property {number} RIGHT_EAR_TRAGION=28 RIGHT_EAR_TRAGION value
                             * @property {number} LEFT_EYE_PUPIL=29 LEFT_EYE_PUPIL value
                             * @property {number} RIGHT_EYE_PUPIL=30 RIGHT_EYE_PUPIL value
                             * @property {number} FOREHEAD_GLABELLA=31 FOREHEAD_GLABELLA value
                             * @property {number} CHIN_GNATHION=32 CHIN_GNATHION value
                             * @property {number} CHIN_LEFT_GONION=33 CHIN_LEFT_GONION value
                             * @property {number} CHIN_RIGHT_GONION=34 CHIN_RIGHT_GONION value
                             * @property {number} LEFT_CHEEK_CENTER=35 LEFT_CHEEK_CENTER value
                             * @property {number} RIGHT_CHEEK_CENTER=36 RIGHT_CHEEK_CENTER value
                             */
                            Landmark.Type = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN_LANDMARK"] = 0;
                                values[valuesById[1] = "LEFT_EYE"] = 1;
                                values[valuesById[2] = "RIGHT_EYE"] = 2;
                                values[valuesById[3] = "LEFT_OF_LEFT_EYEBROW"] = 3;
                                values[valuesById[4] = "RIGHT_OF_LEFT_EYEBROW"] = 4;
                                values[valuesById[5] = "LEFT_OF_RIGHT_EYEBROW"] = 5;
                                values[valuesById[6] = "RIGHT_OF_RIGHT_EYEBROW"] = 6;
                                values[valuesById[7] = "MIDPOINT_BETWEEN_EYES"] = 7;
                                values[valuesById[8] = "NOSE_TIP"] = 8;
                                values[valuesById[9] = "UPPER_LIP"] = 9;
                                values[valuesById[10] = "LOWER_LIP"] = 10;
                                values[valuesById[11] = "MOUTH_LEFT"] = 11;
                                values[valuesById[12] = "MOUTH_RIGHT"] = 12;
                                values[valuesById[13] = "MOUTH_CENTER"] = 13;
                                values[valuesById[14] = "NOSE_BOTTOM_RIGHT"] = 14;
                                values[valuesById[15] = "NOSE_BOTTOM_LEFT"] = 15;
                                values[valuesById[16] = "NOSE_BOTTOM_CENTER"] = 16;
                                values[valuesById[17] = "LEFT_EYE_TOP_BOUNDARY"] = 17;
                                values[valuesById[18] = "LEFT_EYE_RIGHT_CORNER"] = 18;
                                values[valuesById[19] = "LEFT_EYE_BOTTOM_BOUNDARY"] = 19;
                                values[valuesById[20] = "LEFT_EYE_LEFT_CORNER"] = 20;
                                values[valuesById[21] = "RIGHT_EYE_TOP_BOUNDARY"] = 21;
                                values[valuesById[22] = "RIGHT_EYE_RIGHT_CORNER"] = 22;
                                values[valuesById[23] = "RIGHT_EYE_BOTTOM_BOUNDARY"] = 23;
                                values[valuesById[24] = "RIGHT_EYE_LEFT_CORNER"] = 24;
                                values[valuesById[25] = "LEFT_EYEBROW_UPPER_MIDPOINT"] = 25;
                                values[valuesById[26] = "RIGHT_EYEBROW_UPPER_MIDPOINT"] = 26;
                                values[valuesById[27] = "LEFT_EAR_TRAGION"] = 27;
                                values[valuesById[28] = "RIGHT_EAR_TRAGION"] = 28;
                                values[valuesById[29] = "LEFT_EYE_PUPIL"] = 29;
                                values[valuesById[30] = "RIGHT_EYE_PUPIL"] = 30;
                                values[valuesById[31] = "FOREHEAD_GLABELLA"] = 31;
                                values[valuesById[32] = "CHIN_GNATHION"] = 32;
                                values[valuesById[33] = "CHIN_LEFT_GONION"] = 33;
                                values[valuesById[34] = "CHIN_RIGHT_GONION"] = 34;
                                values[valuesById[35] = "LEFT_CHEEK_CENTER"] = 35;
                                values[valuesById[36] = "RIGHT_CHEEK_CENTER"] = 36;
                                return values;
                            })();
    
                            return Landmark;
                        })();
    
                        return FaceAnnotation;
                    })();
    
                    v1.LocationInfo = (function() {
    
                        /**
                         * Properties of a LocationInfo.
                         * @memberof google.cloud.vision.v1
                         * @interface ILocationInfo
                         * @property {google.type.ILatLng|null} [latLng] LocationInfo latLng
                         */
    
                        /**
                         * Constructs a new LocationInfo.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a LocationInfo.
                         * @implements ILocationInfo
                         * @constructor
                         * @param {google.cloud.vision.v1.ILocationInfo=} [properties] Properties to set
                         */
                        function LocationInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocationInfo latLng.
                         * @member {google.type.ILatLng|null|undefined} latLng
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @instance
                         */
                        LocationInfo.prototype.latLng = null;
    
                        /**
                         * Creates a new LocationInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1.ILocationInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.LocationInfo} LocationInfo instance
                         */
                        LocationInfo.create = function create(properties) {
                            return new LocationInfo(properties);
                        };
    
                        /**
                         * Encodes the specified LocationInfo message. Does not implicitly {@link google.cloud.vision.v1.LocationInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
                                $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocationInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1.LocationInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.LocationInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocationInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocationInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLng != null && message.hasOwnProperty("latLng")) {
                                var error = $root.google.type.LatLng.verify(message.latLng);
                                if (error)
                                    return "latLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocationInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.LocationInfo} LocationInfo
                         */
                        LocationInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.LocationInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1.LocationInfo();
                            if (object.latLng != null) {
                                if (typeof object.latLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1.LocationInfo.latLng: object expected");
                                message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocationInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1.LocationInfo} message LocationInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocationInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.latLng = null;
                            if (message.latLng != null && message.hasOwnProperty("latLng"))
                                object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocationInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocationInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocationInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.LocationInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.LocationInfo";
                        };
    
                        return LocationInfo;
                    })();
    
                    v1.Property = (function() {
    
                        /**
                         * Properties of a Property.
                         * @memberof google.cloud.vision.v1
                         * @interface IProperty
                         * @property {string|null} [name] Property name
                         * @property {string|null} [value] Property value
                         * @property {number|Long|null} [uint64Value] Property uint64Value
                         */
    
                        /**
                         * Constructs a new Property.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Property.
                         * @implements IProperty
                         * @constructor
                         * @param {google.cloud.vision.v1.IProperty=} [properties] Properties to set
                         */
                        function Property(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Property name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.Property
                         * @instance
                         */
                        Property.prototype.name = "";
    
                        /**
                         * Property value.
                         * @member {string} value
                         * @memberof google.cloud.vision.v1.Property
                         * @instance
                         */
                        Property.prototype.value = "";
    
                        /**
                         * Property uint64Value.
                         * @member {number|Long} uint64Value
                         * @memberof google.cloud.vision.v1.Property
                         * @instance
                         */
                        Property.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                        /**
                         * Creates a new Property instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {google.cloud.vision.v1.IProperty=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Property} Property instance
                         */
                        Property.create = function create(properties) {
                            return new Property(properties);
                        };
    
                        /**
                         * Encodes the specified Property message. Does not implicitly {@link google.cloud.vision.v1.Property.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {google.cloud.vision.v1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                            if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Property.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {google.cloud.vision.v1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Property();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.value = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.uint64Value = reader.uint64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Property message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Property.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.value != null && message.hasOwnProperty("value"))
                                if (!$util.isString(message.value))
                                    return "value: string expected";
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high)))
                                    return "uint64Value: integer|Long expected";
                            return null;
                        };
    
                        /**
                         * Creates a Property message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Property} Property
                         */
                        Property.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Property)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Property();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.value != null)
                                message.value = String(object.value);
                            if (object.uint64Value != null)
                                if ($util.Long)
                                    (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true;
                                else if (typeof object.uint64Value === "string")
                                    message.uint64Value = parseInt(object.uint64Value, 10);
                                else if (typeof object.uint64Value === "number")
                                    message.uint64Value = object.uint64Value;
                                else if (typeof object.uint64Value === "object")
                                    message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Property message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {google.cloud.vision.v1.Property} message Property
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Property.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.value = "";
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, true);
                                    object.uint64Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.uint64Value = options.longs === String ? "0" : 0;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.value != null && message.hasOwnProperty("value"))
                                object.value = message.value;
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (typeof message.uint64Value === "number")
                                    object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value;
                                else
                                    object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value;
                            return object;
                        };
    
                        /**
                         * Converts this Property to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Property
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Property.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Property
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Property
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Property";
                        };
    
                        return Property;
                    })();
    
                    v1.EntityAnnotation = (function() {
    
                        /**
                         * Properties of an EntityAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface IEntityAnnotation
                         * @property {string|null} [mid] EntityAnnotation mid
                         * @property {string|null} [locale] EntityAnnotation locale
                         * @property {string|null} [description] EntityAnnotation description
                         * @property {number|null} [score] EntityAnnotation score
                         * @property {number|null} [confidence] EntityAnnotation confidence
                         * @property {number|null} [topicality] EntityAnnotation topicality
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] EntityAnnotation boundingPoly
                         * @property {Array.<google.cloud.vision.v1.ILocationInfo>|null} [locations] EntityAnnotation locations
                         * @property {Array.<google.cloud.vision.v1.IProperty>|null} [properties] EntityAnnotation properties
                         */
    
                        /**
                         * Constructs a new EntityAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an EntityAnnotation.
                         * @implements IEntityAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.IEntityAnnotation=} [properties] Properties to set
                         */
                        function EntityAnnotation(properties) {
                            this.locations = [];
                            this.properties = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * EntityAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.mid = "";
    
                        /**
                         * EntityAnnotation locale.
                         * @member {string} locale
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locale = "";
    
                        /**
                         * EntityAnnotation description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.description = "";
    
                        /**
                         * EntityAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.score = 0;
    
                        /**
                         * EntityAnnotation confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.confidence = 0;
    
                        /**
                         * EntityAnnotation topicality.
                         * @member {number} topicality
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.topicality = 0;
    
                        /**
                         * EntityAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * EntityAnnotation locations.
                         * @member {Array.<google.cloud.vision.v1.ILocationInfo>} locations
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locations = $util.emptyArray;
    
                        /**
                         * EntityAnnotation properties.
                         * @member {Array.<google.cloud.vision.v1.IProperty>} properties
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.properties = $util.emptyArray;
    
                        /**
                         * Creates a new EntityAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IEntityAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.EntityAnnotation} EntityAnnotation instance
                         */
                        EntityAnnotation.create = function create(properties) {
                            return new EntityAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message. Does not implicitly {@link google.cloud.vision.v1.EntityAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.locale != null && Object.hasOwnProperty.call(message, "locale"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.locale);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            if (message.topicality != null && Object.hasOwnProperty.call(message, "topicality"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.topicality);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                            if (message.locations != null && message.locations.length)
                                for (var i = 0; i < message.locations.length; ++i)
                                    $root.google.cloud.vision.v1.LocationInfo.encode(message.locations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.properties != null && message.properties.length)
                                for (var i = 0; i < message.properties.length; ++i)
                                    $root.google.cloud.vision.v1.Property.encode(message.properties[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.EntityAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.EntityAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.locale = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.topicality = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        if (!(message.locations && message.locations.length))
                                            message.locations = [];
                                        message.locations.push($root.google.cloud.vision.v1.LocationInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 9: {
                                        if (!(message.properties && message.properties.length))
                                            message.properties = [];
                                        message.properties.push($root.google.cloud.vision.v1.Property.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an EntityAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        EntityAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                if (!$util.isString(message.locale))
                                    return "locale: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                if (typeof message.topicality !== "number")
                                    return "topicality: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.locations != null && message.hasOwnProperty("locations")) {
                                if (!Array.isArray(message.locations))
                                    return "locations: array expected";
                                for (var i = 0; i < message.locations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.LocationInfo.verify(message.locations[i]);
                                    if (error)
                                        return "locations." + error;
                                }
                            }
                            if (message.properties != null && message.hasOwnProperty("properties")) {
                                if (!Array.isArray(message.properties))
                                    return "properties: array expected";
                                for (var i = 0; i < message.properties.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Property.verify(message.properties[i]);
                                    if (error)
                                        return "properties." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an EntityAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.EntityAnnotation} EntityAnnotation
                         */
                        EntityAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.EntityAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.EntityAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.locale != null)
                                message.locale = String(object.locale);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.topicality != null)
                                message.topicality = Number(object.topicality);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.EntityAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.locations) {
                                if (!Array.isArray(object.locations))
                                    throw TypeError(".google.cloud.vision.v1.EntityAnnotation.locations: array expected");
                                message.locations = [];
                                for (var i = 0; i < object.locations.length; ++i) {
                                    if (typeof object.locations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.EntityAnnotation.locations: object expected");
                                    message.locations[i] = $root.google.cloud.vision.v1.LocationInfo.fromObject(object.locations[i]);
                                }
                            }
                            if (object.properties) {
                                if (!Array.isArray(object.properties))
                                    throw TypeError(".google.cloud.vision.v1.EntityAnnotation.properties: array expected");
                                message.properties = [];
                                for (var i = 0; i < object.properties.length; ++i) {
                                    if (typeof object.properties[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.EntityAnnotation.properties: object expected");
                                    message.properties[i] = $root.google.cloud.vision.v1.Property.fromObject(object.properties[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an EntityAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.EntityAnnotation} message EntityAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        EntityAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.locations = [];
                                object.properties = [];
                            }
                            if (options.defaults) {
                                object.mid = "";
                                object.locale = "";
                                object.description = "";
                                object.score = 0;
                                object.confidence = 0;
                                object.topicality = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                object.locale = message.locale;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                object.topicality = options.json && !isFinite(message.topicality) ? String(message.topicality) : message.topicality;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.locations && message.locations.length) {
                                object.locations = [];
                                for (var j = 0; j < message.locations.length; ++j)
                                    object.locations[j] = $root.google.cloud.vision.v1.LocationInfo.toObject(message.locations[j], options);
                            }
                            if (message.properties && message.properties.length) {
                                object.properties = [];
                                for (var j = 0; j < message.properties.length; ++j)
                                    object.properties[j] = $root.google.cloud.vision.v1.Property.toObject(message.properties[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this EntityAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        EntityAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for EntityAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.EntityAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        EntityAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.EntityAnnotation";
                        };
    
                        return EntityAnnotation;
                    })();
    
                    v1.LocalizedObjectAnnotation = (function() {
    
                        /**
                         * Properties of a LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface ILocalizedObjectAnnotation
                         * @property {string|null} [mid] LocalizedObjectAnnotation mid
                         * @property {string|null} [languageCode] LocalizedObjectAnnotation languageCode
                         * @property {string|null} [name] LocalizedObjectAnnotation name
                         * @property {number|null} [score] LocalizedObjectAnnotation score
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] LocalizedObjectAnnotation boundingPoly
                         */
    
                        /**
                         * Constructs a new LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a LocalizedObjectAnnotation.
                         * @implements ILocalizedObjectAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         */
                        function LocalizedObjectAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocalizedObjectAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.mid = "";
    
                        /**
                         * LocalizedObjectAnnotation languageCode.
                         * @member {string} languageCode
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.languageCode = "";
    
                        /**
                         * LocalizedObjectAnnotation name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.name = "";
    
                        /**
                         * LocalizedObjectAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.score = 0;
    
                        /**
                         * LocalizedObjectAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * Creates a new LocalizedObjectAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.LocalizedObjectAnnotation} LocalizedObjectAnnotation instance
                         */
                        LocalizedObjectAnnotation.create = function create(properties) {
                            return new LocalizedObjectAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.LocalizedObjectAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.languageCode = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocalizedObjectAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocalizedObjectAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                if (!$util.isString(message.languageCode))
                                    return "languageCode: string expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocalizedObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         */
                        LocalizedObjectAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.LocalizedObjectAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.LocalizedObjectAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.languageCode != null)
                                message.languageCode = String(object.languageCode);
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.LocalizedObjectAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocalizedObjectAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.LocalizedObjectAnnotation} message LocalizedObjectAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocalizedObjectAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.mid = "";
                                object.languageCode = "";
                                object.name = "";
                                object.score = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                object.languageCode = message.languageCode;
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocalizedObjectAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocalizedObjectAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocalizedObjectAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.LocalizedObjectAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocalizedObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.LocalizedObjectAnnotation";
                        };
    
                        return LocalizedObjectAnnotation;
                    })();
    
                    v1.SafeSearchAnnotation = (function() {
    
                        /**
                         * Properties of a SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface ISafeSearchAnnotation
                         * @property {google.cloud.vision.v1.Likelihood|null} [adult] SafeSearchAnnotation adult
                         * @property {google.cloud.vision.v1.Likelihood|null} [spoof] SafeSearchAnnotation spoof
                         * @property {google.cloud.vision.v1.Likelihood|null} [medical] SafeSearchAnnotation medical
                         * @property {google.cloud.vision.v1.Likelihood|null} [violence] SafeSearchAnnotation violence
                         * @property {google.cloud.vision.v1.Likelihood|null} [racy] SafeSearchAnnotation racy
                         */
    
                        /**
                         * Constructs a new SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a SafeSearchAnnotation.
                         * @implements ISafeSearchAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.ISafeSearchAnnotation=} [properties] Properties to set
                         */
                        function SafeSearchAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * SafeSearchAnnotation adult.
                         * @member {google.cloud.vision.v1.Likelihood} adult
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.adult = 0;
    
                        /**
                         * SafeSearchAnnotation spoof.
                         * @member {google.cloud.vision.v1.Likelihood} spoof
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.spoof = 0;
    
                        /**
                         * SafeSearchAnnotation medical.
                         * @member {google.cloud.vision.v1.Likelihood} medical
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.medical = 0;
    
                        /**
                         * SafeSearchAnnotation violence.
                         * @member {google.cloud.vision.v1.Likelihood} violence
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.violence = 0;
    
                        /**
                         * SafeSearchAnnotation racy.
                         * @member {google.cloud.vision.v1.Likelihood} racy
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.racy = 0;
    
                        /**
                         * Creates a new SafeSearchAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ISafeSearchAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.SafeSearchAnnotation} SafeSearchAnnotation instance
                         */
                        SafeSearchAnnotation.create = function create(properties) {
                            return new SafeSearchAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message. Does not implicitly {@link google.cloud.vision.v1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.adult != null && Object.hasOwnProperty.call(message, "adult"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adult);
                            if (message.spoof != null && Object.hasOwnProperty.call(message, "spoof"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.spoof);
                            if (message.medical != null && Object.hasOwnProperty.call(message, "medical"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.medical);
                            if (message.violence != null && Object.hasOwnProperty.call(message, "violence"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.violence);
                            if (message.racy != null && Object.hasOwnProperty.call(message, "racy"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.racy);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.SafeSearchAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.adult = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.spoof = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.medical = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.violence = reader.int32();
                                        break;
                                    }
                                case 9: {
                                        message.racy = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a SafeSearchAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        SafeSearchAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                switch (message.adult) {
                                default:
                                    return "adult: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                switch (message.spoof) {
                                default:
                                    return "spoof: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                switch (message.medical) {
                                default:
                                    return "medical: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                switch (message.violence) {
                                default:
                                    return "violence: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                switch (message.racy) {
                                default:
                                    return "racy: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a SafeSearchAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.SafeSearchAnnotation} SafeSearchAnnotation
                         */
                        SafeSearchAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.SafeSearchAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.SafeSearchAnnotation();
                            switch (object.adult) {
                            default:
                                if (typeof object.adult === "number") {
                                    message.adult = object.adult;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.adult = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.adult = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.adult = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.adult = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.adult = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.adult = 5;
                                break;
                            }
                            switch (object.spoof) {
                            default:
                                if (typeof object.spoof === "number") {
                                    message.spoof = object.spoof;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.spoof = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.spoof = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.spoof = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.spoof = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.spoof = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.spoof = 5;
                                break;
                            }
                            switch (object.medical) {
                            default:
                                if (typeof object.medical === "number") {
                                    message.medical = object.medical;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.medical = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.medical = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.medical = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.medical = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.medical = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.medical = 5;
                                break;
                            }
                            switch (object.violence) {
                            default:
                                if (typeof object.violence === "number") {
                                    message.violence = object.violence;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.violence = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.violence = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.violence = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.violence = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.violence = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.violence = 5;
                                break;
                            }
                            switch (object.racy) {
                            default:
                                if (typeof object.racy === "number") {
                                    message.racy = object.racy;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.racy = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.racy = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.racy = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.racy = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.racy = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.racy = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a SafeSearchAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.SafeSearchAnnotation} message SafeSearchAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        SafeSearchAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.adult = options.enums === String ? "UNKNOWN" : 0;
                                object.spoof = options.enums === String ? "UNKNOWN" : 0;
                                object.medical = options.enums === String ? "UNKNOWN" : 0;
                                object.violence = options.enums === String ? "UNKNOWN" : 0;
                                object.racy = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                object.adult = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1.Likelihood[message.adult] : message.adult;
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                object.spoof = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1.Likelihood[message.spoof] : message.spoof;
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                object.medical = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1.Likelihood[message.medical] : message.medical;
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                object.violence = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1.Likelihood[message.violence] : message.violence;
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                object.racy = options.enums === String ? $root.google.cloud.vision.v1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1.Likelihood[message.racy] : message.racy;
                            return object;
                        };
    
                        /**
                         * Converts this SafeSearchAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        SafeSearchAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for SafeSearchAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.SafeSearchAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        SafeSearchAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.SafeSearchAnnotation";
                        };
    
                        return SafeSearchAnnotation;
                    })();
    
                    v1.LatLongRect = (function() {
    
                        /**
                         * Properties of a LatLongRect.
                         * @memberof google.cloud.vision.v1
                         * @interface ILatLongRect
                         * @property {google.type.ILatLng|null} [minLatLng] LatLongRect minLatLng
                         * @property {google.type.ILatLng|null} [maxLatLng] LatLongRect maxLatLng
                         */
    
                        /**
                         * Constructs a new LatLongRect.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a LatLongRect.
                         * @implements ILatLongRect
                         * @constructor
                         * @param {google.cloud.vision.v1.ILatLongRect=} [properties] Properties to set
                         */
                        function LatLongRect(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LatLongRect minLatLng.
                         * @member {google.type.ILatLng|null|undefined} minLatLng
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.minLatLng = null;
    
                        /**
                         * LatLongRect maxLatLng.
                         * @member {google.type.ILatLng|null|undefined} maxLatLng
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.maxLatLng = null;
    
                        /**
                         * Creates a new LatLongRect instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1.ILatLongRect=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.LatLongRect} LatLongRect instance
                         */
                        LatLongRect.create = function create(properties) {
                            return new LatLongRect(properties);
                        };
    
                        /**
                         * Encodes the specified LatLongRect message. Does not implicitly {@link google.cloud.vision.v1.LatLongRect.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.minLatLng != null && Object.hasOwnProperty.call(message, "minLatLng"))
                                $root.google.type.LatLng.encode(message.minLatLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.maxLatLng != null && Object.hasOwnProperty.call(message, "maxLatLng"))
                                $root.google.type.LatLng.encode(message.maxLatLng, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LatLongRect message, length delimited. Does not implicitly {@link google.cloud.vision.v1.LatLongRect.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.LatLongRect();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.minLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.maxLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LatLongRect message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LatLongRect.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.minLatLng);
                                if (error)
                                    return "minLatLng." + error;
                            }
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.maxLatLng);
                                if (error)
                                    return "maxLatLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LatLongRect message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.LatLongRect} LatLongRect
                         */
                        LatLongRect.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.LatLongRect)
                                return object;
                            var message = new $root.google.cloud.vision.v1.LatLongRect();
                            if (object.minLatLng != null) {
                                if (typeof object.minLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1.LatLongRect.minLatLng: object expected");
                                message.minLatLng = $root.google.type.LatLng.fromObject(object.minLatLng);
                            }
                            if (object.maxLatLng != null) {
                                if (typeof object.maxLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1.LatLongRect.maxLatLng: object expected");
                                message.maxLatLng = $root.google.type.LatLng.fromObject(object.maxLatLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LatLongRect message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1.LatLongRect} message LatLongRect
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LatLongRect.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.minLatLng = null;
                                object.maxLatLng = null;
                            }
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng"))
                                object.minLatLng = $root.google.type.LatLng.toObject(message.minLatLng, options);
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng"))
                                object.maxLatLng = $root.google.type.LatLng.toObject(message.maxLatLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LatLongRect to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LatLongRect.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LatLongRect
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.LatLongRect
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LatLongRect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.LatLongRect";
                        };
    
                        return LatLongRect;
                    })();
    
                    v1.ColorInfo = (function() {
    
                        /**
                         * Properties of a ColorInfo.
                         * @memberof google.cloud.vision.v1
                         * @interface IColorInfo
                         * @property {google.type.IColor|null} [color] ColorInfo color
                         * @property {number|null} [score] ColorInfo score
                         * @property {number|null} [pixelFraction] ColorInfo pixelFraction
                         */
    
                        /**
                         * Constructs a new ColorInfo.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ColorInfo.
                         * @implements IColorInfo
                         * @constructor
                         * @param {google.cloud.vision.v1.IColorInfo=} [properties] Properties to set
                         */
                        function ColorInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ColorInfo color.
                         * @member {google.type.IColor|null|undefined} color
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.color = null;
    
                        /**
                         * ColorInfo score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.score = 0;
    
                        /**
                         * ColorInfo pixelFraction.
                         * @member {number} pixelFraction
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.pixelFraction = 0;
    
                        /**
                         * Creates a new ColorInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1.IColorInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ColorInfo} ColorInfo instance
                         */
                        ColorInfo.create = function create(properties) {
                            return new ColorInfo(properties);
                        };
    
                        /**
                         * Encodes the specified ColorInfo message. Does not implicitly {@link google.cloud.vision.v1.ColorInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.color != null && Object.hasOwnProperty.call(message, "color"))
                                $root.google.type.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                            if (message.pixelFraction != null && Object.hasOwnProperty.call(message, "pixelFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.pixelFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ColorInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ColorInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ColorInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.color = $root.google.type.Color.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.pixelFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ColorInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ColorInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.color != null && message.hasOwnProperty("color")) {
                                var error = $root.google.type.Color.verify(message.color);
                                if (error)
                                    return "color." + error;
                            }
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                if (typeof message.pixelFraction !== "number")
                                    return "pixelFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a ColorInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ColorInfo} ColorInfo
                         */
                        ColorInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ColorInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ColorInfo();
                            if (object.color != null) {
                                if (typeof object.color !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ColorInfo.color: object expected");
                                message.color = $root.google.type.Color.fromObject(object.color);
                            }
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.pixelFraction != null)
                                message.pixelFraction = Number(object.pixelFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ColorInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1.ColorInfo} message ColorInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ColorInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.color = null;
                                object.score = 0;
                                object.pixelFraction = 0;
                            }
                            if (message.color != null && message.hasOwnProperty("color"))
                                object.color = $root.google.type.Color.toObject(message.color, options);
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                object.pixelFraction = options.json && !isFinite(message.pixelFraction) ? String(message.pixelFraction) : message.pixelFraction;
                            return object;
                        };
    
                        /**
                         * Converts this ColorInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ColorInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ColorInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ColorInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ColorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ColorInfo";
                        };
    
                        return ColorInfo;
                    })();
    
                    v1.DominantColorsAnnotation = (function() {
    
                        /**
                         * Properties of a DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface IDominantColorsAnnotation
                         * @property {Array.<google.cloud.vision.v1.IColorInfo>|null} [colors] DominantColorsAnnotation colors
                         */
    
                        /**
                         * Constructs a new DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a DominantColorsAnnotation.
                         * @implements IDominantColorsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.IDominantColorsAnnotation=} [properties] Properties to set
                         */
                        function DominantColorsAnnotation(properties) {
                            this.colors = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DominantColorsAnnotation colors.
                         * @member {Array.<google.cloud.vision.v1.IColorInfo>} colors
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @instance
                         */
                        DominantColorsAnnotation.prototype.colors = $util.emptyArray;
    
                        /**
                         * Creates a new DominantColorsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IDominantColorsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.DominantColorsAnnotation} DominantColorsAnnotation instance
                         */
                        DominantColorsAnnotation.create = function create(properties) {
                            return new DominantColorsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message. Does not implicitly {@link google.cloud.vision.v1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.colors != null && message.colors.length)
                                for (var i = 0; i < message.colors.length; ++i)
                                    $root.google.cloud.vision.v1.ColorInfo.encode(message.colors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.DominantColorsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.colors && message.colors.length))
                                            message.colors = [];
                                        message.colors.push($root.google.cloud.vision.v1.ColorInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DominantColorsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DominantColorsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.colors != null && message.hasOwnProperty("colors")) {
                                if (!Array.isArray(message.colors))
                                    return "colors: array expected";
                                for (var i = 0; i < message.colors.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ColorInfo.verify(message.colors[i]);
                                    if (error)
                                        return "colors." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a DominantColorsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.DominantColorsAnnotation} DominantColorsAnnotation
                         */
                        DominantColorsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.DominantColorsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.DominantColorsAnnotation();
                            if (object.colors) {
                                if (!Array.isArray(object.colors))
                                    throw TypeError(".google.cloud.vision.v1.DominantColorsAnnotation.colors: array expected");
                                message.colors = [];
                                for (var i = 0; i < object.colors.length; ++i) {
                                    if (typeof object.colors[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.DominantColorsAnnotation.colors: object expected");
                                    message.colors[i] = $root.google.cloud.vision.v1.ColorInfo.fromObject(object.colors[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DominantColorsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.DominantColorsAnnotation} message DominantColorsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DominantColorsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.colors = [];
                            if (message.colors && message.colors.length) {
                                object.colors = [];
                                for (var j = 0; j < message.colors.length; ++j)
                                    object.colors[j] = $root.google.cloud.vision.v1.ColorInfo.toObject(message.colors[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this DominantColorsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DominantColorsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DominantColorsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.DominantColorsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DominantColorsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.DominantColorsAnnotation";
                        };
    
                        return DominantColorsAnnotation;
                    })();
    
                    v1.ImageProperties = (function() {
    
                        /**
                         * Properties of an ImageProperties.
                         * @memberof google.cloud.vision.v1
                         * @interface IImageProperties
                         * @property {google.cloud.vision.v1.IDominantColorsAnnotation|null} [dominantColors] ImageProperties dominantColors
                         */
    
                        /**
                         * Constructs a new ImageProperties.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImageProperties.
                         * @implements IImageProperties
                         * @constructor
                         * @param {google.cloud.vision.v1.IImageProperties=} [properties] Properties to set
                         */
                        function ImageProperties(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageProperties dominantColors.
                         * @member {google.cloud.vision.v1.IDominantColorsAnnotation|null|undefined} dominantColors
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @instance
                         */
                        ImageProperties.prototype.dominantColors = null;
    
                        /**
                         * Creates a new ImageProperties instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1.IImageProperties=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImageProperties} ImageProperties instance
                         */
                        ImageProperties.create = function create(properties) {
                            return new ImageProperties(properties);
                        };
    
                        /**
                         * Encodes the specified ImageProperties message. Does not implicitly {@link google.cloud.vision.v1.ImageProperties.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dominantColors != null && Object.hasOwnProperty.call(message, "dominantColors"))
                                $root.google.cloud.vision.v1.DominantColorsAnnotation.encode(message.dominantColors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageProperties message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImageProperties.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImageProperties();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dominantColors = $root.google.cloud.vision.v1.DominantColorsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageProperties message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageProperties.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors")) {
                                var error = $root.google.cloud.vision.v1.DominantColorsAnnotation.verify(message.dominantColors);
                                if (error)
                                    return "dominantColors." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageProperties message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImageProperties} ImageProperties
                         */
                        ImageProperties.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImageProperties)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImageProperties();
                            if (object.dominantColors != null) {
                                if (typeof object.dominantColors !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageProperties.dominantColors: object expected");
                                message.dominantColors = $root.google.cloud.vision.v1.DominantColorsAnnotation.fromObject(object.dominantColors);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageProperties message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1.ImageProperties} message ImageProperties
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageProperties.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.dominantColors = null;
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors"))
                                object.dominantColors = $root.google.cloud.vision.v1.DominantColorsAnnotation.toObject(message.dominantColors, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageProperties to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageProperties.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageProperties
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImageProperties
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImageProperties";
                        };
    
                        return ImageProperties;
                    })();
    
                    v1.CropHint = (function() {
    
                        /**
                         * Properties of a CropHint.
                         * @memberof google.cloud.vision.v1
                         * @interface ICropHint
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] CropHint boundingPoly
                         * @property {number|null} [confidence] CropHint confidence
                         * @property {number|null} [importanceFraction] CropHint importanceFraction
                         */
    
                        /**
                         * Constructs a new CropHint.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CropHint.
                         * @implements ICropHint
                         * @constructor
                         * @param {google.cloud.vision.v1.ICropHint=} [properties] Properties to set
                         */
                        function CropHint(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHint boundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1.CropHint
                         * @instance
                         */
                        CropHint.prototype.boundingPoly = null;
    
                        /**
                         * CropHint confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.CropHint
                         * @instance
                         */
                        CropHint.prototype.confidence = 0;
    
                        /**
                         * CropHint importanceFraction.
                         * @member {number} importanceFraction
                         * @memberof google.cloud.vision.v1.CropHint
                         * @instance
                         */
                        CropHint.prototype.importanceFraction = 0;
    
                        /**
                         * Creates a new CropHint instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1.ICropHint=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CropHint} CropHint instance
                         */
                        CropHint.create = function create(properties) {
                            return new CropHint(properties);
                        };
    
                        /**
                         * Encodes the specified CropHint message. Does not implicitly {@link google.cloud.vision.v1.CropHint.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            if (message.importanceFraction != null && Object.hasOwnProperty.call(message, "importanceFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.importanceFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHint message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CropHint.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CropHint();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.importanceFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHint message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHint.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                if (typeof message.importanceFraction !== "number")
                                    return "importanceFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a CropHint message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CropHint} CropHint
                         */
                        CropHint.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CropHint)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CropHint();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.CropHint.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.importanceFraction != null)
                                message.importanceFraction = Number(object.importanceFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHint message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1.CropHint} message CropHint
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHint.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.confidence = 0;
                                object.importanceFraction = 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                object.importanceFraction = options.json && !isFinite(message.importanceFraction) ? String(message.importanceFraction) : message.importanceFraction;
                            return object;
                        };
    
                        /**
                         * Converts this CropHint to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CropHint
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHint.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHint
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CropHint
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CropHint";
                        };
    
                        return CropHint;
                    })();
    
                    v1.CropHintsAnnotation = (function() {
    
                        /**
                         * Properties of a CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface ICropHintsAnnotation
                         * @property {Array.<google.cloud.vision.v1.ICropHint>|null} [cropHints] CropHintsAnnotation cropHints
                         */
    
                        /**
                         * Constructs a new CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CropHintsAnnotation.
                         * @implements ICropHintsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.ICropHintsAnnotation=} [properties] Properties to set
                         */
                        function CropHintsAnnotation(properties) {
                            this.cropHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsAnnotation cropHints.
                         * @member {Array.<google.cloud.vision.v1.ICropHint>} cropHints
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @instance
                         */
                        CropHintsAnnotation.prototype.cropHints = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CropHintsAnnotation} CropHintsAnnotation instance
                         */
                        CropHintsAnnotation.create = function create(properties) {
                            return new CropHintsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message. Does not implicitly {@link google.cloud.vision.v1.CropHintsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.cropHints != null && message.cropHints.length)
                                for (var i = 0; i < message.cropHints.length; ++i)
                                    $root.google.cloud.vision.v1.CropHint.encode(message.cropHints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CropHintsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CropHintsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.cropHints && message.cropHints.length))
                                            message.cropHints = [];
                                        message.cropHints.push($root.google.cloud.vision.v1.CropHint.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.cropHints != null && message.hasOwnProperty("cropHints")) {
                                if (!Array.isArray(message.cropHints))
                                    return "cropHints: array expected";
                                for (var i = 0; i < message.cropHints.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.CropHint.verify(message.cropHints[i]);
                                    if (error)
                                        return "cropHints." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CropHintsAnnotation} CropHintsAnnotation
                         */
                        CropHintsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CropHintsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CropHintsAnnotation();
                            if (object.cropHints) {
                                if (!Array.isArray(object.cropHints))
                                    throw TypeError(".google.cloud.vision.v1.CropHintsAnnotation.cropHints: array expected");
                                message.cropHints = [];
                                for (var i = 0; i < object.cropHints.length; ++i) {
                                    if (typeof object.cropHints[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.CropHintsAnnotation.cropHints: object expected");
                                    message.cropHints[i] = $root.google.cloud.vision.v1.CropHint.fromObject(object.cropHints[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.CropHintsAnnotation} message CropHintsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.cropHints = [];
                            if (message.cropHints && message.cropHints.length) {
                                object.cropHints = [];
                                for (var j = 0; j < message.cropHints.length; ++j)
                                    object.cropHints[j] = $root.google.cloud.vision.v1.CropHint.toObject(message.cropHints[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CropHintsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CropHintsAnnotation";
                        };
    
                        return CropHintsAnnotation;
                    })();
    
                    v1.CropHintsParams = (function() {
    
                        /**
                         * Properties of a CropHintsParams.
                         * @memberof google.cloud.vision.v1
                         * @interface ICropHintsParams
                         * @property {Array.<number>|null} [aspectRatios] CropHintsParams aspectRatios
                         */
    
                        /**
                         * Constructs a new CropHintsParams.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CropHintsParams.
                         * @implements ICropHintsParams
                         * @constructor
                         * @param {google.cloud.vision.v1.ICropHintsParams=} [properties] Properties to set
                         */
                        function CropHintsParams(properties) {
                            this.aspectRatios = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsParams aspectRatios.
                         * @member {Array.<number>} aspectRatios
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @instance
                         */
                        CropHintsParams.prototype.aspectRatios = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CropHintsParams} CropHintsParams instance
                         */
                        CropHintsParams.create = function create(properties) {
                            return new CropHintsParams(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message. Does not implicitly {@link google.cloud.vision.v1.CropHintsParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.aspectRatios != null && message.aspectRatios.length) {
                                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    writer.float(message.aspectRatios[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CropHintsParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CropHintsParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.aspectRatios && message.aspectRatios.length))
                                            message.aspectRatios = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.aspectRatios.push(reader.float());
                                        } else
                                            message.aspectRatios.push(reader.float());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.aspectRatios != null && message.hasOwnProperty("aspectRatios")) {
                                if (!Array.isArray(message.aspectRatios))
                                    return "aspectRatios: array expected";
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    if (typeof message.aspectRatios[i] !== "number")
                                        return "aspectRatios: number[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CropHintsParams} CropHintsParams
                         */
                        CropHintsParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CropHintsParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CropHintsParams();
                            if (object.aspectRatios) {
                                if (!Array.isArray(object.aspectRatios))
                                    throw TypeError(".google.cloud.vision.v1.CropHintsParams.aspectRatios: array expected");
                                message.aspectRatios = [];
                                for (var i = 0; i < object.aspectRatios.length; ++i)
                                    message.aspectRatios[i] = Number(object.aspectRatios[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1.CropHintsParams} message CropHintsParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.aspectRatios = [];
                            if (message.aspectRatios && message.aspectRatios.length) {
                                object.aspectRatios = [];
                                for (var j = 0; j < message.aspectRatios.length; ++j)
                                    object.aspectRatios[j] = options.json && !isFinite(message.aspectRatios[j]) ? String(message.aspectRatios[j]) : message.aspectRatios[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CropHintsParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CropHintsParams";
                        };
    
                        return CropHintsParams;
                    })();
    
                    v1.WebDetectionParams = (function() {
    
                        /**
                         * Properties of a WebDetectionParams.
                         * @memberof google.cloud.vision.v1
                         * @interface IWebDetectionParams
                         * @property {boolean|null} [includeGeoResults] WebDetectionParams includeGeoResults
                         */
    
                        /**
                         * Constructs a new WebDetectionParams.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a WebDetectionParams.
                         * @implements IWebDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1.IWebDetectionParams=} [properties] Properties to set
                         */
                        function WebDetectionParams(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetectionParams includeGeoResults.
                         * @member {boolean} includeGeoResults
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @instance
                         */
                        WebDetectionParams.prototype.includeGeoResults = false;
    
                        /**
                         * Creates a new WebDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.WebDetectionParams} WebDetectionParams instance
                         */
                        WebDetectionParams.create = function create(properties) {
                            return new WebDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message. Does not implicitly {@link google.cloud.vision.v1.WebDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.includeGeoResults != null && Object.hasOwnProperty.call(message, "includeGeoResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeGeoResults);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.includeGeoResults = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                if (typeof message.includeGeoResults !== "boolean")
                                    return "includeGeoResults: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a WebDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.WebDetectionParams} WebDetectionParams
                         */
                        WebDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.WebDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1.WebDetectionParams();
                            if (object.includeGeoResults != null)
                                message.includeGeoResults = Boolean(object.includeGeoResults);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.WebDetectionParams} message WebDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.includeGeoResults = false;
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                object.includeGeoResults = message.includeGeoResults;
                            return object;
                        };
    
                        /**
                         * Converts this WebDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.WebDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.WebDetectionParams";
                        };
    
                        return WebDetectionParams;
                    })();
    
                    v1.TextDetectionParams = (function() {
    
                        /**
                         * Properties of a TextDetectionParams.
                         * @memberof google.cloud.vision.v1
                         * @interface ITextDetectionParams
                         * @property {boolean|null} [enableTextDetectionConfidenceScore] TextDetectionParams enableTextDetectionConfidenceScore
                         * @property {Array.<string>|null} [advancedOcrOptions] TextDetectionParams advancedOcrOptions
                         */
    
                        /**
                         * Constructs a new TextDetectionParams.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a TextDetectionParams.
                         * @implements ITextDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1.ITextDetectionParams=} [properties] Properties to set
                         */
                        function TextDetectionParams(properties) {
                            this.advancedOcrOptions = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextDetectionParams enableTextDetectionConfidenceScore.
                         * @member {boolean} enableTextDetectionConfidenceScore
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.enableTextDetectionConfidenceScore = false;
    
                        /**
                         * TextDetectionParams advancedOcrOptions.
                         * @member {Array.<string>} advancedOcrOptions
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.advancedOcrOptions = $util.emptyArray;
    
                        /**
                         * Creates a new TextDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.ITextDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.TextDetectionParams} TextDetectionParams instance
                         */
                        TextDetectionParams.create = function create(properties) {
                            return new TextDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message. Does not implicitly {@link google.cloud.vision.v1.TextDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.enableTextDetectionConfidenceScore != null && Object.hasOwnProperty.call(message, "enableTextDetectionConfidenceScore"))
                                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enableTextDetectionConfidenceScore);
                            if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.advancedOcrOptions[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1.TextDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.TextDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.enableTextDetectionConfidenceScore = reader.bool();
                                        break;
                                    }
                                case 11: {
                                        if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
                                            message.advancedOcrOptions = [];
                                        message.advancedOcrOptions.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                if (typeof message.enableTextDetectionConfidenceScore !== "boolean")
                                    return "enableTextDetectionConfidenceScore: boolean expected";
                            if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
                                if (!Array.isArray(message.advancedOcrOptions))
                                    return "advancedOcrOptions: array expected";
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    if (!$util.isString(message.advancedOcrOptions[i]))
                                        return "advancedOcrOptions: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a TextDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.TextDetectionParams} TextDetectionParams
                         */
                        TextDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.TextDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1.TextDetectionParams();
                            if (object.enableTextDetectionConfidenceScore != null)
                                message.enableTextDetectionConfidenceScore = Boolean(object.enableTextDetectionConfidenceScore);
                            if (object.advancedOcrOptions) {
                                if (!Array.isArray(object.advancedOcrOptions))
                                    throw TypeError(".google.cloud.vision.v1.TextDetectionParams.advancedOcrOptions: array expected");
                                message.advancedOcrOptions = [];
                                for (var i = 0; i < object.advancedOcrOptions.length; ++i)
                                    message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1.TextDetectionParams} message TextDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.advancedOcrOptions = [];
                            if (options.defaults)
                                object.enableTextDetectionConfidenceScore = false;
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                object.enableTextDetectionConfidenceScore = message.enableTextDetectionConfidenceScore;
                            if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
                                object.advancedOcrOptions = [];
                                for (var j = 0; j < message.advancedOcrOptions.length; ++j)
                                    object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this TextDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.TextDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.TextDetectionParams";
                        };
    
                        return TextDetectionParams;
                    })();
    
                    v1.ImageContext = (function() {
    
                        /**
                         * Properties of an ImageContext.
                         * @memberof google.cloud.vision.v1
                         * @interface IImageContext
                         * @property {google.cloud.vision.v1.ILatLongRect|null} [latLongRect] ImageContext latLongRect
                         * @property {Array.<string>|null} [languageHints] ImageContext languageHints
                         * @property {google.cloud.vision.v1.ICropHintsParams|null} [cropHintsParams] ImageContext cropHintsParams
                         * @property {google.cloud.vision.v1.IProductSearchParams|null} [productSearchParams] ImageContext productSearchParams
                         * @property {google.cloud.vision.v1.IWebDetectionParams|null} [webDetectionParams] ImageContext webDetectionParams
                         * @property {google.cloud.vision.v1.ITextDetectionParams|null} [textDetectionParams] ImageContext textDetectionParams
                         */
    
                        /**
                         * Constructs a new ImageContext.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImageContext.
                         * @implements IImageContext
                         * @constructor
                         * @param {google.cloud.vision.v1.IImageContext=} [properties] Properties to set
                         */
                        function ImageContext(properties) {
                            this.languageHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageContext latLongRect.
                         * @member {google.cloud.vision.v1.ILatLongRect|null|undefined} latLongRect
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.latLongRect = null;
    
                        /**
                         * ImageContext languageHints.
                         * @member {Array.<string>} languageHints
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.languageHints = $util.emptyArray;
    
                        /**
                         * ImageContext cropHintsParams.
                         * @member {google.cloud.vision.v1.ICropHintsParams|null|undefined} cropHintsParams
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.cropHintsParams = null;
    
                        /**
                         * ImageContext productSearchParams.
                         * @member {google.cloud.vision.v1.IProductSearchParams|null|undefined} productSearchParams
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.productSearchParams = null;
    
                        /**
                         * ImageContext webDetectionParams.
                         * @member {google.cloud.vision.v1.IWebDetectionParams|null|undefined} webDetectionParams
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.webDetectionParams = null;
    
                        /**
                         * ImageContext textDetectionParams.
                         * @member {google.cloud.vision.v1.ITextDetectionParams|null|undefined} textDetectionParams
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.textDetectionParams = null;
    
                        /**
                         * Creates a new ImageContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImageContext} ImageContext instance
                         */
                        ImageContext.create = function create(properties) {
                            return new ImageContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageContext message. Does not implicitly {@link google.cloud.vision.v1.ImageContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLongRect != null && Object.hasOwnProperty.call(message, "latLongRect"))
                                $root.google.cloud.vision.v1.LatLongRect.encode(message.latLongRect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.languageHints != null && message.languageHints.length)
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageHints[i]);
                            if (message.cropHintsParams != null && Object.hasOwnProperty.call(message, "cropHintsParams"))
                                $root.google.cloud.vision.v1.CropHintsParams.encode(message.cropHintsParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.productSearchParams != null && Object.hasOwnProperty.call(message, "productSearchParams"))
                                $root.google.cloud.vision.v1.ProductSearchParams.encode(message.productSearchParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.webDetectionParams != null && Object.hasOwnProperty.call(message, "webDetectionParams"))
                                $root.google.cloud.vision.v1.WebDetectionParams.encode(message.webDetectionParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.textDetectionParams != null && Object.hasOwnProperty.call(message, "textDetectionParams"))
                                $root.google.cloud.vision.v1.TextDetectionParams.encode(message.textDetectionParams, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImageContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImageContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLongRect = $root.google.cloud.vision.v1.LatLongRect.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.languageHints && message.languageHints.length))
                                            message.languageHints = [];
                                        message.languageHints.push(reader.string());
                                        break;
                                    }
                                case 4: {
                                        message.cropHintsParams = $root.google.cloud.vision.v1.CropHintsParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        message.productSearchParams = $root.google.cloud.vision.v1.ProductSearchParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.webDetectionParams = $root.google.cloud.vision.v1.WebDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 12: {
                                        message.textDetectionParams = $root.google.cloud.vision.v1.TextDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect")) {
                                var error = $root.google.cloud.vision.v1.LatLongRect.verify(message.latLongRect);
                                if (error)
                                    return "latLongRect." + error;
                            }
                            if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
                                if (!Array.isArray(message.languageHints))
                                    return "languageHints: array expected";
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    if (!$util.isString(message.languageHints[i]))
                                        return "languageHints: string[] expected";
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams")) {
                                var error = $root.google.cloud.vision.v1.CropHintsParams.verify(message.cropHintsParams);
                                if (error)
                                    return "cropHintsParams." + error;
                            }
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams")) {
                                var error = $root.google.cloud.vision.v1.ProductSearchParams.verify(message.productSearchParams);
                                if (error)
                                    return "productSearchParams." + error;
                            }
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams")) {
                                var error = $root.google.cloud.vision.v1.WebDetectionParams.verify(message.webDetectionParams);
                                if (error)
                                    return "webDetectionParams." + error;
                            }
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams")) {
                                var error = $root.google.cloud.vision.v1.TextDetectionParams.verify(message.textDetectionParams);
                                if (error)
                                    return "textDetectionParams." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImageContext} ImageContext
                         */
                        ImageContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImageContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImageContext();
                            if (object.latLongRect != null) {
                                if (typeof object.latLongRect !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.latLongRect: object expected");
                                message.latLongRect = $root.google.cloud.vision.v1.LatLongRect.fromObject(object.latLongRect);
                            }
                            if (object.languageHints) {
                                if (!Array.isArray(object.languageHints))
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.languageHints: array expected");
                                message.languageHints = [];
                                for (var i = 0; i < object.languageHints.length; ++i)
                                    message.languageHints[i] = String(object.languageHints[i]);
                            }
                            if (object.cropHintsParams != null) {
                                if (typeof object.cropHintsParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.cropHintsParams: object expected");
                                message.cropHintsParams = $root.google.cloud.vision.v1.CropHintsParams.fromObject(object.cropHintsParams);
                            }
                            if (object.productSearchParams != null) {
                                if (typeof object.productSearchParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.productSearchParams: object expected");
                                message.productSearchParams = $root.google.cloud.vision.v1.ProductSearchParams.fromObject(object.productSearchParams);
                            }
                            if (object.webDetectionParams != null) {
                                if (typeof object.webDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.webDetectionParams: object expected");
                                message.webDetectionParams = $root.google.cloud.vision.v1.WebDetectionParams.fromObject(object.webDetectionParams);
                            }
                            if (object.textDetectionParams != null) {
                                if (typeof object.textDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImageContext.textDetectionParams: object expected");
                                message.textDetectionParams = $root.google.cloud.vision.v1.TextDetectionParams.fromObject(object.textDetectionParams);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1.ImageContext} message ImageContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.languageHints = [];
                            if (options.defaults) {
                                object.latLongRect = null;
                                object.cropHintsParams = null;
                                object.productSearchParams = null;
                                object.webDetectionParams = null;
                                object.textDetectionParams = null;
                            }
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect"))
                                object.latLongRect = $root.google.cloud.vision.v1.LatLongRect.toObject(message.latLongRect, options);
                            if (message.languageHints && message.languageHints.length) {
                                object.languageHints = [];
                                for (var j = 0; j < message.languageHints.length; ++j)
                                    object.languageHints[j] = message.languageHints[j];
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams"))
                                object.cropHintsParams = $root.google.cloud.vision.v1.CropHintsParams.toObject(message.cropHintsParams, options);
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams"))
                                object.productSearchParams = $root.google.cloud.vision.v1.ProductSearchParams.toObject(message.productSearchParams, options);
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams"))
                                object.webDetectionParams = $root.google.cloud.vision.v1.WebDetectionParams.toObject(message.webDetectionParams, options);
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams"))
                                object.textDetectionParams = $root.google.cloud.vision.v1.TextDetectionParams.toObject(message.textDetectionParams, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImageContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImageContext";
                        };
    
                        return ImageContext;
                    })();
    
                    v1.AnnotateImageRequest = (function() {
    
                        /**
                         * Properties of an AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAnnotateImageRequest
                         * @property {google.cloud.vision.v1.IImage|null} [image] AnnotateImageRequest image
                         * @property {Array.<google.cloud.vision.v1.IFeature>|null} [features] AnnotateImageRequest features
                         * @property {google.cloud.vision.v1.IImageContext|null} [imageContext] AnnotateImageRequest imageContext
                         */
    
                        /**
                         * Constructs a new AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AnnotateImageRequest.
                         * @implements IAnnotateImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAnnotateImageRequest=} [properties] Properties to set
                         */
                        function AnnotateImageRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageRequest image.
                         * @member {google.cloud.vision.v1.IImage|null|undefined} image
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.image = null;
    
                        /**
                         * AnnotateImageRequest features.
                         * @member {Array.<google.cloud.vision.v1.IFeature>} features
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateImageRequest imageContext.
                         * @member {google.cloud.vision.v1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.imageContext = null;
    
                        /**
                         * Creates a new AnnotateImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AnnotateImageRequest} AnnotateImageRequest instance
                         */
                        AnnotateImageRequest.create = function create(properties) {
                            return new AnnotateImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message. Does not implicitly {@link google.cloud.vision.v1.AnnotateImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                $root.google.cloud.vision.v1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AnnotateImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AnnotateImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.image = $root.google.cloud.vision.v1.Image.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.image != null && message.hasOwnProperty("image")) {
                                var error = $root.google.cloud.vision.v1.Image.verify(message.image);
                                if (error)
                                    return "image." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AnnotateImageRequest} AnnotateImageRequest
                         */
                        AnnotateImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AnnotateImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AnnotateImageRequest();
                            if (object.image != null) {
                                if (typeof object.image !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageRequest.image: object expected");
                                message.image = $root.google.cloud.vision.v1.Image.fromObject(object.image);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1.ImageContext.fromObject(object.imageContext);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.AnnotateImageRequest} message AnnotateImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.image = null;
                                object.imageContext = null;
                            }
                            if (message.image != null && message.hasOwnProperty("image"))
                                object.image = $root.google.cloud.vision.v1.Image.toObject(message.image, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1.ImageContext.toObject(message.imageContext, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AnnotateImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AnnotateImageRequest";
                        };
    
                        return AnnotateImageRequest;
                    })();
    
                    v1.ImageAnnotationContext = (function() {
    
                        /**
                         * Properties of an ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1
                         * @interface IImageAnnotationContext
                         * @property {string|null} [uri] ImageAnnotationContext uri
                         * @property {number|null} [pageNumber] ImageAnnotationContext pageNumber
                         */
    
                        /**
                         * Constructs a new ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImageAnnotationContext.
                         * @implements IImageAnnotationContext
                         * @constructor
                         * @param {google.cloud.vision.v1.IImageAnnotationContext=} [properties] Properties to set
                         */
                        function ImageAnnotationContext(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageAnnotationContext uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.uri = "";
    
                        /**
                         * ImageAnnotationContext pageNumber.
                         * @member {number} pageNumber
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.pageNumber = 0;
    
                        /**
                         * Creates a new ImageAnnotationContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageAnnotationContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImageAnnotationContext} ImageAnnotationContext instance
                         */
                        ImageAnnotationContext.create = function create(properties) {
                            return new ImageAnnotationContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message. Does not implicitly {@link google.cloud.vision.v1.ImageAnnotationContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImageAnnotationContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImageAnnotationContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageNumber = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageAnnotationContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageAnnotationContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                if (!$util.isInteger(message.pageNumber))
                                    return "pageNumber: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageAnnotationContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImageAnnotationContext} ImageAnnotationContext
                         */
                        ImageAnnotationContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImageAnnotationContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImageAnnotationContext();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.pageNumber != null)
                                message.pageNumber = object.pageNumber | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageAnnotationContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1.ImageAnnotationContext} message ImageAnnotationContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageAnnotationContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.uri = "";
                                object.pageNumber = 0;
                            }
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                object.pageNumber = message.pageNumber;
                            return object;
                        };
    
                        /**
                         * Converts this ImageAnnotationContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageAnnotationContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageAnnotationContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImageAnnotationContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageAnnotationContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImageAnnotationContext";
                        };
    
                        return ImageAnnotationContext;
                    })();
    
                    v1.AnnotateImageResponse = (function() {
    
                        /**
                         * Properties of an AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IAnnotateImageResponse
                         * @property {Array.<google.cloud.vision.v1.IFaceAnnotation>|null} [faceAnnotations] AnnotateImageResponse faceAnnotations
                         * @property {Array.<google.cloud.vision.v1.IEntityAnnotation>|null} [landmarkAnnotations] AnnotateImageResponse landmarkAnnotations
                         * @property {Array.<google.cloud.vision.v1.IEntityAnnotation>|null} [logoAnnotations] AnnotateImageResponse logoAnnotations
                         * @property {Array.<google.cloud.vision.v1.IEntityAnnotation>|null} [labelAnnotations] AnnotateImageResponse labelAnnotations
                         * @property {Array.<google.cloud.vision.v1.ILocalizedObjectAnnotation>|null} [localizedObjectAnnotations] AnnotateImageResponse localizedObjectAnnotations
                         * @property {Array.<google.cloud.vision.v1.IEntityAnnotation>|null} [textAnnotations] AnnotateImageResponse textAnnotations
                         * @property {google.cloud.vision.v1.ITextAnnotation|null} [fullTextAnnotation] AnnotateImageResponse fullTextAnnotation
                         * @property {google.cloud.vision.v1.ISafeSearchAnnotation|null} [safeSearchAnnotation] AnnotateImageResponse safeSearchAnnotation
                         * @property {google.cloud.vision.v1.IImageProperties|null} [imagePropertiesAnnotation] AnnotateImageResponse imagePropertiesAnnotation
                         * @property {google.cloud.vision.v1.ICropHintsAnnotation|null} [cropHintsAnnotation] AnnotateImageResponse cropHintsAnnotation
                         * @property {google.cloud.vision.v1.IWebDetection|null} [webDetection] AnnotateImageResponse webDetection
                         * @property {google.cloud.vision.v1.IProductSearchResults|null} [productSearchResults] AnnotateImageResponse productSearchResults
                         * @property {google.rpc.IStatus|null} [error] AnnotateImageResponse error
                         * @property {google.cloud.vision.v1.IImageAnnotationContext|null} [context] AnnotateImageResponse context
                         */
    
                        /**
                         * Constructs a new AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AnnotateImageResponse.
                         * @implements IAnnotateImageResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IAnnotateImageResponse=} [properties] Properties to set
                         */
                        function AnnotateImageResponse(properties) {
                            this.faceAnnotations = [];
                            this.landmarkAnnotations = [];
                            this.logoAnnotations = [];
                            this.labelAnnotations = [];
                            this.localizedObjectAnnotations = [];
                            this.textAnnotations = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageResponse faceAnnotations.
                         * @member {Array.<google.cloud.vision.v1.IFaceAnnotation>} faceAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.faceAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse landmarkAnnotations.
                         * @member {Array.<google.cloud.vision.v1.IEntityAnnotation>} landmarkAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.landmarkAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse logoAnnotations.
                         * @member {Array.<google.cloud.vision.v1.IEntityAnnotation>} logoAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.logoAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse labelAnnotations.
                         * @member {Array.<google.cloud.vision.v1.IEntityAnnotation>} labelAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.labelAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse localizedObjectAnnotations.
                         * @member {Array.<google.cloud.vision.v1.ILocalizedObjectAnnotation>} localizedObjectAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.localizedObjectAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse textAnnotations.
                         * @member {Array.<google.cloud.vision.v1.IEntityAnnotation>} textAnnotations
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.textAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse fullTextAnnotation.
                         * @member {google.cloud.vision.v1.ITextAnnotation|null|undefined} fullTextAnnotation
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.fullTextAnnotation = null;
    
                        /**
                         * AnnotateImageResponse safeSearchAnnotation.
                         * @member {google.cloud.vision.v1.ISafeSearchAnnotation|null|undefined} safeSearchAnnotation
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.safeSearchAnnotation = null;
    
                        /**
                         * AnnotateImageResponse imagePropertiesAnnotation.
                         * @member {google.cloud.vision.v1.IImageProperties|null|undefined} imagePropertiesAnnotation
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.imagePropertiesAnnotation = null;
    
                        /**
                         * AnnotateImageResponse cropHintsAnnotation.
                         * @member {google.cloud.vision.v1.ICropHintsAnnotation|null|undefined} cropHintsAnnotation
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.cropHintsAnnotation = null;
    
                        /**
                         * AnnotateImageResponse webDetection.
                         * @member {google.cloud.vision.v1.IWebDetection|null|undefined} webDetection
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.webDetection = null;
    
                        /**
                         * AnnotateImageResponse productSearchResults.
                         * @member {google.cloud.vision.v1.IProductSearchResults|null|undefined} productSearchResults
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.productSearchResults = null;
    
                        /**
                         * AnnotateImageResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.error = null;
    
                        /**
                         * AnnotateImageResponse context.
                         * @member {google.cloud.vision.v1.IImageAnnotationContext|null|undefined} context
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.context = null;
    
                        /**
                         * Creates a new AnnotateImageResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AnnotateImageResponse} AnnotateImageResponse instance
                         */
                        AnnotateImageResponse.create = function create(properties) {
                            return new AnnotateImageResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message. Does not implicitly {@link google.cloud.vision.v1.AnnotateImageResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.faceAnnotations != null && message.faceAnnotations.length)
                                for (var i = 0; i < message.faceAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.FaceAnnotation.encode(message.faceAnnotations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.landmarkAnnotations != null && message.landmarkAnnotations.length)
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.EntityAnnotation.encode(message.landmarkAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.logoAnnotations != null && message.logoAnnotations.length)
                                for (var i = 0; i < message.logoAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.EntityAnnotation.encode(message.logoAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.labelAnnotations != null && message.labelAnnotations.length)
                                for (var i = 0; i < message.labelAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.EntityAnnotation.encode(message.labelAnnotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.textAnnotations != null && message.textAnnotations.length)
                                for (var i = 0; i < message.textAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.EntityAnnotation.encode(message.textAnnotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.safeSearchAnnotation != null && Object.hasOwnProperty.call(message, "safeSearchAnnotation"))
                                $root.google.cloud.vision.v1.SafeSearchAnnotation.encode(message.safeSearchAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.imagePropertiesAnnotation != null && Object.hasOwnProperty.call(message, "imagePropertiesAnnotation"))
                                $root.google.cloud.vision.v1.ImageProperties.encode(message.imagePropertiesAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            if (message.cropHintsAnnotation != null && Object.hasOwnProperty.call(message, "cropHintsAnnotation"))
                                $root.google.cloud.vision.v1.CropHintsAnnotation.encode(message.cropHintsAnnotation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                            if (message.fullTextAnnotation != null && Object.hasOwnProperty.call(message, "fullTextAnnotation"))
                                $root.google.cloud.vision.v1.TextAnnotation.encode(message.fullTextAnnotation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            if (message.webDetection != null && Object.hasOwnProperty.call(message, "webDetection"))
                                $root.google.cloud.vision.v1.WebDetection.encode(message.webDetection, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                            if (message.productSearchResults != null && Object.hasOwnProperty.call(message, "productSearchResults"))
                                $root.google.cloud.vision.v1.ProductSearchResults.encode(message.productSearchResults, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
                            if (message.context != null && Object.hasOwnProperty.call(message, "context"))
                                $root.google.cloud.vision.v1.ImageAnnotationContext.encode(message.context, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                            if (message.localizedObjectAnnotations != null && message.localizedObjectAnnotations.length)
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1.LocalizedObjectAnnotation.encode(message.localizedObjectAnnotations[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AnnotateImageResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AnnotateImageResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.faceAnnotations && message.faceAnnotations.length))
                                            message.faceAnnotations = [];
                                        message.faceAnnotations.push($root.google.cloud.vision.v1.FaceAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.landmarkAnnotations && message.landmarkAnnotations.length))
                                            message.landmarkAnnotations = [];
                                        message.landmarkAnnotations.push($root.google.cloud.vision.v1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.logoAnnotations && message.logoAnnotations.length))
                                            message.logoAnnotations = [];
                                        message.logoAnnotations.push($root.google.cloud.vision.v1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.labelAnnotations && message.labelAnnotations.length))
                                            message.labelAnnotations = [];
                                        message.labelAnnotations.push($root.google.cloud.vision.v1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 22: {
                                        if (!(message.localizedObjectAnnotations && message.localizedObjectAnnotations.length))
                                            message.localizedObjectAnnotations = [];
                                        message.localizedObjectAnnotations.push($root.google.cloud.vision.v1.LocalizedObjectAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        if (!(message.textAnnotations && message.textAnnotations.length))
                                            message.textAnnotations = [];
                                        message.textAnnotations.push($root.google.cloud.vision.v1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 12: {
                                        message.fullTextAnnotation = $root.google.cloud.vision.v1.TextAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.safeSearchAnnotation = $root.google.cloud.vision.v1.SafeSearchAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        message.imagePropertiesAnnotation = $root.google.cloud.vision.v1.ImageProperties.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 11: {
                                        message.cropHintsAnnotation = $root.google.cloud.vision.v1.CropHintsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 13: {
                                        message.webDetection = $root.google.cloud.vision.v1.WebDetection.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 14: {
                                        message.productSearchResults = $root.google.cloud.vision.v1.ProductSearchResults.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 9: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 21: {
                                        message.context = $root.google.cloud.vision.v1.ImageAnnotationContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.faceAnnotations != null && message.hasOwnProperty("faceAnnotations")) {
                                if (!Array.isArray(message.faceAnnotations))
                                    return "faceAnnotations: array expected";
                                for (var i = 0; i < message.faceAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.FaceAnnotation.verify(message.faceAnnotations[i]);
                                    if (error)
                                        return "faceAnnotations." + error;
                                }
                            }
                            if (message.landmarkAnnotations != null && message.hasOwnProperty("landmarkAnnotations")) {
                                if (!Array.isArray(message.landmarkAnnotations))
                                    return "landmarkAnnotations: array expected";
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.EntityAnnotation.verify(message.landmarkAnnotations[i]);
                                    if (error)
                                        return "landmarkAnnotations." + error;
                                }
                            }
                            if (message.logoAnnotations != null && message.hasOwnProperty("logoAnnotations")) {
                                if (!Array.isArray(message.logoAnnotations))
                                    return "logoAnnotations: array expected";
                                for (var i = 0; i < message.logoAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.EntityAnnotation.verify(message.logoAnnotations[i]);
                                    if (error)
                                        return "logoAnnotations." + error;
                                }
                            }
                            if (message.labelAnnotations != null && message.hasOwnProperty("labelAnnotations")) {
                                if (!Array.isArray(message.labelAnnotations))
                                    return "labelAnnotations: array expected";
                                for (var i = 0; i < message.labelAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.EntityAnnotation.verify(message.labelAnnotations[i]);
                                    if (error)
                                        return "labelAnnotations." + error;
                                }
                            }
                            if (message.localizedObjectAnnotations != null && message.hasOwnProperty("localizedObjectAnnotations")) {
                                if (!Array.isArray(message.localizedObjectAnnotations))
                                    return "localizedObjectAnnotations: array expected";
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.LocalizedObjectAnnotation.verify(message.localizedObjectAnnotations[i]);
                                    if (error)
                                        return "localizedObjectAnnotations." + error;
                                }
                            }
                            if (message.textAnnotations != null && message.hasOwnProperty("textAnnotations")) {
                                if (!Array.isArray(message.textAnnotations))
                                    return "textAnnotations: array expected";
                                for (var i = 0; i < message.textAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.EntityAnnotation.verify(message.textAnnotations[i]);
                                    if (error)
                                        return "textAnnotations." + error;
                                }
                            }
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.verify(message.fullTextAnnotation);
                                if (error)
                                    return "fullTextAnnotation." + error;
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation")) {
                                var error = $root.google.cloud.vision.v1.SafeSearchAnnotation.verify(message.safeSearchAnnotation);
                                if (error)
                                    return "safeSearchAnnotation." + error;
                            }
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation")) {
                                var error = $root.google.cloud.vision.v1.ImageProperties.verify(message.imagePropertiesAnnotation);
                                if (error)
                                    return "imagePropertiesAnnotation." + error;
                            }
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation")) {
                                var error = $root.google.cloud.vision.v1.CropHintsAnnotation.verify(message.cropHintsAnnotation);
                                if (error)
                                    return "cropHintsAnnotation." + error;
                            }
                            if (message.webDetection != null && message.hasOwnProperty("webDetection")) {
                                var error = $root.google.cloud.vision.v1.WebDetection.verify(message.webDetection);
                                if (error)
                                    return "webDetection." + error;
                            }
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults")) {
                                var error = $root.google.cloud.vision.v1.ProductSearchResults.verify(message.productSearchResults);
                                if (error)
                                    return "productSearchResults." + error;
                            }
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            if (message.context != null && message.hasOwnProperty("context")) {
                                var error = $root.google.cloud.vision.v1.ImageAnnotationContext.verify(message.context);
                                if (error)
                                    return "context." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AnnotateImageResponse} AnnotateImageResponse
                         */
                        AnnotateImageResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AnnotateImageResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AnnotateImageResponse();
                            if (object.faceAnnotations) {
                                if (!Array.isArray(object.faceAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.faceAnnotations: array expected");
                                message.faceAnnotations = [];
                                for (var i = 0; i < object.faceAnnotations.length; ++i) {
                                    if (typeof object.faceAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.faceAnnotations: object expected");
                                    message.faceAnnotations[i] = $root.google.cloud.vision.v1.FaceAnnotation.fromObject(object.faceAnnotations[i]);
                                }
                            }
                            if (object.landmarkAnnotations) {
                                if (!Array.isArray(object.landmarkAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.landmarkAnnotations: array expected");
                                message.landmarkAnnotations = [];
                                for (var i = 0; i < object.landmarkAnnotations.length; ++i) {
                                    if (typeof object.landmarkAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.landmarkAnnotations: object expected");
                                    message.landmarkAnnotations[i] = $root.google.cloud.vision.v1.EntityAnnotation.fromObject(object.landmarkAnnotations[i]);
                                }
                            }
                            if (object.logoAnnotations) {
                                if (!Array.isArray(object.logoAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.logoAnnotations: array expected");
                                message.logoAnnotations = [];
                                for (var i = 0; i < object.logoAnnotations.length; ++i) {
                                    if (typeof object.logoAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.logoAnnotations: object expected");
                                    message.logoAnnotations[i] = $root.google.cloud.vision.v1.EntityAnnotation.fromObject(object.logoAnnotations[i]);
                                }
                            }
                            if (object.labelAnnotations) {
                                if (!Array.isArray(object.labelAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.labelAnnotations: array expected");
                                message.labelAnnotations = [];
                                for (var i = 0; i < object.labelAnnotations.length; ++i) {
                                    if (typeof object.labelAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.labelAnnotations: object expected");
                                    message.labelAnnotations[i] = $root.google.cloud.vision.v1.EntityAnnotation.fromObject(object.labelAnnotations[i]);
                                }
                            }
                            if (object.localizedObjectAnnotations) {
                                if (!Array.isArray(object.localizedObjectAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.localizedObjectAnnotations: array expected");
                                message.localizedObjectAnnotations = [];
                                for (var i = 0; i < object.localizedObjectAnnotations.length; ++i) {
                                    if (typeof object.localizedObjectAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.localizedObjectAnnotations: object expected");
                                    message.localizedObjectAnnotations[i] = $root.google.cloud.vision.v1.LocalizedObjectAnnotation.fromObject(object.localizedObjectAnnotations[i]);
                                }
                            }
                            if (object.textAnnotations) {
                                if (!Array.isArray(object.textAnnotations))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.textAnnotations: array expected");
                                message.textAnnotations = [];
                                for (var i = 0; i < object.textAnnotations.length; ++i) {
                                    if (typeof object.textAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.textAnnotations: object expected");
                                    message.textAnnotations[i] = $root.google.cloud.vision.v1.EntityAnnotation.fromObject(object.textAnnotations[i]);
                                }
                            }
                            if (object.fullTextAnnotation != null) {
                                if (typeof object.fullTextAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.fullTextAnnotation: object expected");
                                message.fullTextAnnotation = $root.google.cloud.vision.v1.TextAnnotation.fromObject(object.fullTextAnnotation);
                            }
                            if (object.safeSearchAnnotation != null) {
                                if (typeof object.safeSearchAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.safeSearchAnnotation: object expected");
                                message.safeSearchAnnotation = $root.google.cloud.vision.v1.SafeSearchAnnotation.fromObject(object.safeSearchAnnotation);
                            }
                            if (object.imagePropertiesAnnotation != null) {
                                if (typeof object.imagePropertiesAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.imagePropertiesAnnotation: object expected");
                                message.imagePropertiesAnnotation = $root.google.cloud.vision.v1.ImageProperties.fromObject(object.imagePropertiesAnnotation);
                            }
                            if (object.cropHintsAnnotation != null) {
                                if (typeof object.cropHintsAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.cropHintsAnnotation: object expected");
                                message.cropHintsAnnotation = $root.google.cloud.vision.v1.CropHintsAnnotation.fromObject(object.cropHintsAnnotation);
                            }
                            if (object.webDetection != null) {
                                if (typeof object.webDetection !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.webDetection: object expected");
                                message.webDetection = $root.google.cloud.vision.v1.WebDetection.fromObject(object.webDetection);
                            }
                            if (object.productSearchResults != null) {
                                if (typeof object.productSearchResults !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.productSearchResults: object expected");
                                message.productSearchResults = $root.google.cloud.vision.v1.ProductSearchResults.fromObject(object.productSearchResults);
                            }
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            if (object.context != null) {
                                if (typeof object.context !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateImageResponse.context: object expected");
                                message.context = $root.google.cloud.vision.v1.ImageAnnotationContext.fromObject(object.context);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1.AnnotateImageResponse} message AnnotateImageResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.faceAnnotations = [];
                                object.landmarkAnnotations = [];
                                object.logoAnnotations = [];
                                object.labelAnnotations = [];
                                object.textAnnotations = [];
                                object.localizedObjectAnnotations = [];
                            }
                            if (options.defaults) {
                                object.safeSearchAnnotation = null;
                                object.imagePropertiesAnnotation = null;
                                object.error = null;
                                object.cropHintsAnnotation = null;
                                object.fullTextAnnotation = null;
                                object.webDetection = null;
                                object.productSearchResults = null;
                                object.context = null;
                            }
                            if (message.faceAnnotations && message.faceAnnotations.length) {
                                object.faceAnnotations = [];
                                for (var j = 0; j < message.faceAnnotations.length; ++j)
                                    object.faceAnnotations[j] = $root.google.cloud.vision.v1.FaceAnnotation.toObject(message.faceAnnotations[j], options);
                            }
                            if (message.landmarkAnnotations && message.landmarkAnnotations.length) {
                                object.landmarkAnnotations = [];
                                for (var j = 0; j < message.landmarkAnnotations.length; ++j)
                                    object.landmarkAnnotations[j] = $root.google.cloud.vision.v1.EntityAnnotation.toObject(message.landmarkAnnotations[j], options);
                            }
                            if (message.logoAnnotations && message.logoAnnotations.length) {
                                object.logoAnnotations = [];
                                for (var j = 0; j < message.logoAnnotations.length; ++j)
                                    object.logoAnnotations[j] = $root.google.cloud.vision.v1.EntityAnnotation.toObject(message.logoAnnotations[j], options);
                            }
                            if (message.labelAnnotations && message.labelAnnotations.length) {
                                object.labelAnnotations = [];
                                for (var j = 0; j < message.labelAnnotations.length; ++j)
                                    object.labelAnnotations[j] = $root.google.cloud.vision.v1.EntityAnnotation.toObject(message.labelAnnotations[j], options);
                            }
                            if (message.textAnnotations && message.textAnnotations.length) {
                                object.textAnnotations = [];
                                for (var j = 0; j < message.textAnnotations.length; ++j)
                                    object.textAnnotations[j] = $root.google.cloud.vision.v1.EntityAnnotation.toObject(message.textAnnotations[j], options);
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation"))
                                object.safeSearchAnnotation = $root.google.cloud.vision.v1.SafeSearchAnnotation.toObject(message.safeSearchAnnotation, options);
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation"))
                                object.imagePropertiesAnnotation = $root.google.cloud.vision.v1.ImageProperties.toObject(message.imagePropertiesAnnotation, options);
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation"))
                                object.cropHintsAnnotation = $root.google.cloud.vision.v1.CropHintsAnnotation.toObject(message.cropHintsAnnotation, options);
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation"))
                                object.fullTextAnnotation = $root.google.cloud.vision.v1.TextAnnotation.toObject(message.fullTextAnnotation, options);
                            if (message.webDetection != null && message.hasOwnProperty("webDetection"))
                                object.webDetection = $root.google.cloud.vision.v1.WebDetection.toObject(message.webDetection, options);
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults"))
                                object.productSearchResults = $root.google.cloud.vision.v1.ProductSearchResults.toObject(message.productSearchResults, options);
                            if (message.context != null && message.hasOwnProperty("context"))
                                object.context = $root.google.cloud.vision.v1.ImageAnnotationContext.toObject(message.context, options);
                            if (message.localizedObjectAnnotations && message.localizedObjectAnnotations.length) {
                                object.localizedObjectAnnotations = [];
                                for (var j = 0; j < message.localizedObjectAnnotations.length; ++j)
                                    object.localizedObjectAnnotations[j] = $root.google.cloud.vision.v1.LocalizedObjectAnnotation.toObject(message.localizedObjectAnnotations[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AnnotateImageResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AnnotateImageResponse";
                        };
    
                        return AnnotateImageResponse;
                    })();
    
                    v1.BatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1.IAnnotateImageRequest>|null} [requests] BatchAnnotateImagesRequest requests
                         * @property {string|null} [parent] BatchAnnotateImagesRequest parent
                         * @property {Object.<string,string>|null} [labels] BatchAnnotateImagesRequest labels
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BatchAnnotateImagesRequest.
                         * @implements IBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            this.labels = {};
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * BatchAnnotateImagesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.parent = "";
    
                        /**
                         * BatchAnnotateImagesRequest labels.
                         * @member {Object.<string,string>} labels
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.labels = $util.emptyObject;
    
                        /**
                         * Creates a new BatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest instance
                         */
                        BatchAnnotateImagesRequest.create = function create(properties) {
                            return new BatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent);
                            if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
                                for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
                                    writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BatchAnnotateImagesRequest(), key, value;
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (message.labels === $util.emptyObject)
                                            message.labels = {};
                                        var end2 = reader.uint32() + reader.pos;
                                        key = "";
                                        value = "";
                                        while (reader.pos < end2) {
                                            var tag2 = reader.uint32();
                                            switch (tag2 >>> 3) {
                                            case 1:
                                                key = reader.string();
                                                break;
                                            case 2:
                                                value = reader.string();
                                                break;
                                            default:
                                                reader.skipType(tag2 & 7);
                                                break;
                                            }
                                        }
                                        message.labels[key] = value;
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.labels != null && message.hasOwnProperty("labels")) {
                                if (!$util.isObject(message.labels))
                                    return "labels: object expected";
                                var key = Object.keys(message.labels);
                                for (var i = 0; i < key.length; ++i)
                                    if (!$util.isString(message.labels[key[i]]))
                                        return "labels: string{k:string} expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         */
                        BatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.labels) {
                                if (typeof object.labels !== "object")
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateImagesRequest.labels: object expected");
                                message.labels = {};
                                for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
                                    message.labels[keys[i]] = String(object.labels[keys[i]]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.BatchAnnotateImagesRequest} message BatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (options.objects || options.defaults)
                                object.labels = {};
                            if (options.defaults)
                                object.parent = "";
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            var keys2;
                            if (message.labels && (keys2 = Object.keys(message.labels)).length) {
                                object.labels = {};
                                for (var j = 0; j < keys2.length; ++j)
                                    object.labels[keys2[j]] = message.labels[keys2[j]];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BatchAnnotateImagesRequest";
                        };
    
                        return BatchAnnotateImagesRequest;
                    })();
    
                    v1.BatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IBatchAnnotateImagesResponse
                         * @property {Array.<google.cloud.vision.v1.IAnnotateImageResponse>|null} [responses] BatchAnnotateImagesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BatchAnnotateImagesResponse.
                         * @implements IBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesResponse responses.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @instance
                         */
                        BatchAnnotateImagesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse instance
                         */
                        BatchAnnotateImagesResponse.create = function create(properties) {
                            return new BatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         */
                        BatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BatchAnnotateImagesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateImagesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BatchAnnotateImagesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.BatchAnnotateImagesResponse} message BatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BatchAnnotateImagesResponse";
                        };
    
                        return BatchAnnotateImagesResponse;
                    })();
    
                    v1.AnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AnnotateFileRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAnnotateFileRequest
                         * @property {google.cloud.vision.v1.IInputConfig|null} [inputConfig] AnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1.IFeature>|null} [features] AnnotateFileRequest features
                         * @property {google.cloud.vision.v1.IImageContext|null} [imageContext] AnnotateFileRequest imageContext
                         * @property {Array.<number>|null} [pages] AnnotateFileRequest pages
                         */
    
                        /**
                         * Constructs a new AnnotateFileRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AnnotateFileRequest.
                         * @implements IAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AnnotateFileRequest(properties) {
                            this.features = [];
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1.IFeature>} features
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AnnotateFileRequest pages.
                         * @member {Array.<number>} pages
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.pages = $util.emptyArray;
    
                        /**
                         * Creates a new AnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AnnotateFileRequest} AnnotateFileRequest instance
                         */
                        AnnotateFileRequest.create = function create(properties) {
                            return new AnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1.AnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileRequest} message AnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pages != null && message.pages.length) {
                                writer.uint32(/* id 4, wireType 2 =*/34).fork();
                                for (var i = 0; i < message.pages.length; ++i)
                                    writer.int32(message.pages[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileRequest} message AnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AnnotateFileRequest} AnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.pages.push(reader.int32());
                                        } else
                                            message.pages.push(reader.int32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AnnotateFileRequest} AnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i)
                                    if (!$util.isInteger(message.pages[i]))
                                        return "pages: integer[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AnnotateFileRequest} AnnotateFileRequest
                         */
                        AnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileRequest.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i)
                                    message.pages[i] = object.pages[i] | 0;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.AnnotateFileRequest} message AnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.features = [];
                                object.pages = [];
                            }
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1.ImageContext.toObject(message.imageContext, options);
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = message.pages[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AnnotateFileRequest";
                        };
    
                        return AnnotateFileRequest;
                    })();
    
                    v1.AnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IAnnotateFileResponse
                         * @property {google.cloud.vision.v1.IInputConfig|null} [inputConfig] AnnotateFileResponse inputConfig
                         * @property {Array.<google.cloud.vision.v1.IAnnotateImageResponse>|null} [responses] AnnotateFileResponse responses
                         * @property {number|null} [totalPages] AnnotateFileResponse totalPages
                         * @property {google.rpc.IStatus|null} [error] AnnotateFileResponse error
                         */
    
                        /**
                         * Constructs a new AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AnnotateFileResponse.
                         * @implements IAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AnnotateFileResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileResponse inputConfig.
                         * @member {google.cloud.vision.v1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileResponse responses.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * AnnotateFileResponse totalPages.
                         * @member {number} totalPages
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.totalPages = 0;
    
                        /**
                         * AnnotateFileResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.error = null;
    
                        /**
                         * Creates a new AnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AnnotateFileResponse} AnnotateFileResponse instance
                         */
                        AnnotateFileResponse.create = function create(properties) {
                            return new AnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1.AnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.totalPages != null && Object.hasOwnProperty.call(message, "totalPages"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalPages);
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.totalPages = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            if (message.totalPages != null && message.hasOwnProperty("totalPages"))
                                if (!$util.isInteger(message.totalPages))
                                    return "totalPages: integer expected";
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AnnotateFileResponse} AnnotateFileResponse
                         */
                        AnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AnnotateFileResponse();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileResponse.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AnnotateFileResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            if (object.totalPages != null)
                                message.totalPages = object.totalPages | 0;
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AnnotateFileResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.AnnotateFileResponse} message AnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.totalPages = 0;
                                object.error = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1.InputConfig.toObject(message.inputConfig, options);
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            if (message.totalPages != null && message.hasOwnProperty("totalPages"))
                                object.totalPages = message.totalPages;
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AnnotateFileResponse";
                        };
    
                        return AnnotateFileResponse;
                    })();
    
                    v1.BatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1.IAnnotateFileRequest>|null} [requests] BatchAnnotateFilesRequest requests
                         * @property {string|null} [parent] BatchAnnotateFilesRequest parent
                         * @property {Object.<string,string>|null} [labels] BatchAnnotateFilesRequest labels
                         */
    
                        /**
                         * Constructs a new BatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BatchAnnotateFilesRequest.
                         * @implements IBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            this.labels = {};
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @instance
                         */
                        BatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * BatchAnnotateFilesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @instance
                         */
                        BatchAnnotateFilesRequest.prototype.parent = "";
    
                        /**
                         * BatchAnnotateFilesRequest labels.
                         * @member {Object.<string,string>} labels
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @instance
                         */
                        BatchAnnotateFilesRequest.prototype.labels = $util.emptyObject;
    
                        /**
                         * Creates a new BatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest instance
                         */
                        BatchAnnotateFilesRequest.create = function create(properties) {
                            return new BatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest} message BatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.parent);
                            if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
                                for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
                                    writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesRequest} message BatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BatchAnnotateFilesRequest(), key, value;
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1.AnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (message.labels === $util.emptyObject)
                                            message.labels = {};
                                        var end2 = reader.uint32() + reader.pos;
                                        key = "";
                                        value = "";
                                        while (reader.pos < end2) {
                                            var tag2 = reader.uint32();
                                            switch (tag2 >>> 3) {
                                            case 1:
                                                key = reader.string();
                                                break;
                                            case 2:
                                                value = reader.string();
                                                break;
                                            default:
                                                reader.skipType(tag2 & 7);
                                                break;
                                            }
                                        }
                                        message.labels[key] = value;
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.labels != null && message.hasOwnProperty("labels")) {
                                if (!$util.isObject(message.labels))
                                    return "labels: object expected";
                                var key = Object.keys(message.labels);
                                for (var i = 0; i < key.length; ++i)
                                    if (!$util.isString(message.labels[key[i]]))
                                        return "labels: string{k:string} expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         */
                        BatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1.AnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.labels) {
                                if (typeof object.labels !== "object")
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateFilesRequest.labels: object expected");
                                message.labels = {};
                                for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
                                    message.labels[keys[i]] = String(object.labels[keys[i]]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.BatchAnnotateFilesRequest} message BatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (options.objects || options.defaults)
                                object.labels = {};
                            if (options.defaults)
                                object.parent = "";
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1.AnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            var keys2;
                            if (message.labels && (keys2 = Object.keys(message.labels)).length) {
                                object.labels = {};
                                for (var j = 0; j < keys2.length; ++j)
                                    object.labels[keys2[j]] = message.labels[keys2[j]];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BatchAnnotateFilesRequest";
                        };
    
                        return BatchAnnotateFilesRequest;
                    })();
    
                    v1.BatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1.IAnnotateFileResponse>|null} [responses] BatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BatchAnnotateFilesResponse.
                         * @implements IBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @instance
                         */
                        BatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse instance
                         */
                        BatchAnnotateFilesResponse.create = function create(properties) {
                            return new BatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesResponse} message BatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IBatchAnnotateFilesResponse} message BatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1.AnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         */
                        BatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1.BatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.BatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1.AnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.BatchAnnotateFilesResponse} message BatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1.AnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BatchAnnotateFilesResponse";
                        };
    
                        return BatchAnnotateFilesResponse;
                    })();
    
                    v1.AsyncAnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncAnnotateFileRequest
                         * @property {google.cloud.vision.v1.IInputConfig|null} [inputConfig] AsyncAnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1.IFeature>|null} [features] AsyncAnnotateFileRequest features
                         * @property {google.cloud.vision.v1.IImageContext|null} [imageContext] AsyncAnnotateFileRequest imageContext
                         * @property {google.cloud.vision.v1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileRequest outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncAnnotateFileRequest.
                         * @implements IAsyncAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AsyncAnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1.IFeature>} features
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AsyncAnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AsyncAnnotateFileRequest outputConfig.
                         * @member {google.cloud.vision.v1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest instance
                         */
                        AsyncAnnotateFileRequest.create = function create(properties) {
                            return new AsyncAnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncAnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         */
                        AsyncAnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncAnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncAnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1.AsyncAnnotateFileRequest} message AsyncAnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                                object.outputConfig = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1.ImageContext.toObject(message.imageContext, options);
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncAnnotateFileRequest";
                        };
    
                        return AsyncAnnotateFileRequest;
                    })();
    
                    v1.AsyncAnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncAnnotateFileResponse
                         * @property {google.cloud.vision.v1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncAnnotateFileResponse.
                         * @implements IAsyncAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileResponse outputConfig.
                         * @member {google.cloud.vision.v1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @instance
                         */
                        AsyncAnnotateFileResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse instance
                         */
                        AsyncAnnotateFileResponse.create = function create(properties) {
                            return new AsyncAnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncAnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         */
                        AsyncAnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncAnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncAnnotateFileResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncAnnotateFileResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1.AsyncAnnotateFileResponse} message AsyncAnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncAnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncAnnotateFileResponse";
                        };
    
                        return AsyncAnnotateFileResponse;
                    })();
    
                    v1.AsyncBatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1.IAnnotateImageRequest>|null} [requests] AsyncBatchAnnotateImagesRequest requests
                         * @property {google.cloud.vision.v1.IOutputConfig|null} [outputConfig] AsyncBatchAnnotateImagesRequest outputConfig
                         * @property {string|null} [parent] AsyncBatchAnnotateImagesRequest parent
                         * @property {Object.<string,string>|null} [labels] AsyncBatchAnnotateImagesRequest labels
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncBatchAnnotateImagesRequest.
                         * @implements IAsyncBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            this.labels = {};
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * AsyncBatchAnnotateImagesRequest outputConfig.
                         * @member {google.cloud.vision.v1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.outputConfig = null;
    
                        /**
                         * AsyncBatchAnnotateImagesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.parent = "";
    
                        /**
                         * AsyncBatchAnnotateImagesRequest labels.
                         * @member {Object.<string,string>} labels
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.labels = $util.emptyObject;
    
                        /**
                         * Creates a new AsyncBatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest instance
                         */
                        AsyncBatchAnnotateImagesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent);
                            if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
                                for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
                                    writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest(), key, value;
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (message.labels === $util.emptyObject)
                                            message.labels = {};
                                        var end2 = reader.uint32() + reader.pos;
                                        key = "";
                                        value = "";
                                        while (reader.pos < end2) {
                                            var tag2 = reader.uint32();
                                            switch (tag2 >>> 3) {
                                            case 1:
                                                key = reader.string();
                                                break;
                                            case 2:
                                                value = reader.string();
                                                break;
                                            default:
                                                reader.skipType(tag2 & 7);
                                                break;
                                            }
                                        }
                                        message.labels[key] = value;
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.labels != null && message.hasOwnProperty("labels")) {
                                if (!$util.isObject(message.labels))
                                    return "labels: object expected";
                                var key = Object.keys(message.labels);
                                for (var i = 0; i < key.length; ++i)
                                    if (!$util.isString(message.labels[key[i]]))
                                        return "labels: string{k:string} expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         */
                        AsyncBatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.fromObject(object.outputConfig);
                            }
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.labels) {
                                if (typeof object.labels !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest.labels: object expected");
                                message.labels = {};
                                for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
                                    message.labels[keys[i]] = String(object.labels[keys[i]]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (options.objects || options.defaults)
                                object.labels = {};
                            if (options.defaults) {
                                object.outputConfig = null;
                                object.parent = "";
                            }
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1.OutputConfig.toObject(message.outputConfig, options);
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            var keys2;
                            if (message.labels && (keys2 = Object.keys(message.labels)).length) {
                                object.labels = {};
                                for (var j = 0; j < keys2.length; ++j)
                                    object.labels[keys2[j]] = message.labels[keys2[j]];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncBatchAnnotateImagesRequest";
                        };
    
                        return AsyncBatchAnnotateImagesRequest;
                    })();
    
                    v1.AsyncBatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncBatchAnnotateImagesResponse
                         * @property {google.cloud.vision.v1.IOutputConfig|null} [outputConfig] AsyncBatchAnnotateImagesResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncBatchAnnotateImagesResponse.
                         * @implements IAsyncBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateImagesResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateImagesResponse outputConfig.
                         * @member {google.cloud.vision.v1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateImagesResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncBatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse instance
                         */
                        AsyncBatchAnnotateImagesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         */
                        AsyncBatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncBatchAnnotateImagesResponse";
                        };
    
                        return AsyncBatchAnnotateImagesResponse;
                    })();
    
                    v1.AsyncBatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1.IAsyncAnnotateFileRequest>|null} [requests] AsyncBatchAnnotateFilesRequest requests
                         * @property {string|null} [parent] AsyncBatchAnnotateFilesRequest parent
                         * @property {Object.<string,string>|null} [labels] AsyncBatchAnnotateFilesRequest labels
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncBatchAnnotateFilesRequest.
                         * @implements IAsyncBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            this.labels = {};
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1.IAsyncAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * AsyncBatchAnnotateFilesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.parent = "";
    
                        /**
                         * AsyncBatchAnnotateFilesRequest labels.
                         * @member {Object.<string,string>} labels
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.labels = $util.emptyObject;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest instance
                         */
                        AsyncBatchAnnotateFilesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1.AsyncAnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.parent);
                            if (message.labels != null && Object.hasOwnProperty.call(message, "labels"))
                                for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i)
                                    writer.uint32(/* id 5, wireType 2 =*/42).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(), key, value;
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1.AsyncAnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (message.labels === $util.emptyObject)
                                            message.labels = {};
                                        var end2 = reader.uint32() + reader.pos;
                                        key = "";
                                        value = "";
                                        while (reader.pos < end2) {
                                            var tag2 = reader.uint32();
                                            switch (tag2 >>> 3) {
                                            case 1:
                                                key = reader.string();
                                                break;
                                            case 2:
                                                value = reader.string();
                                                break;
                                            default:
                                                reader.skipType(tag2 & 7);
                                                break;
                                            }
                                        }
                                        message.labels[key] = value;
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AsyncAnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.labels != null && message.hasOwnProperty("labels")) {
                                if (!$util.isObject(message.labels))
                                    return "labels: object expected";
                                var key = Object.keys(message.labels);
                                for (var i = 0; i < key.length; ++i)
                                    if (!$util.isString(message.labels[key[i]]))
                                        return "labels: string{k:string} expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         */
                        AsyncBatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1.AsyncAnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.labels) {
                                if (typeof object.labels !== "object")
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest.labels: object expected");
                                message.labels = {};
                                for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i)
                                    message.labels[keys[i]] = String(object.labels[keys[i]]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (options.objects || options.defaults)
                                object.labels = {};
                            if (options.defaults)
                                object.parent = "";
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1.AsyncAnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            var keys2;
                            if (message.labels && (keys2 = Object.keys(message.labels)).length) {
                                object.labels = {};
                                for (var j = 0; j < keys2.length; ++j)
                                    object.labels[keys2[j]] = message.labels[keys2[j]];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest";
                        };
    
                        return AsyncBatchAnnotateFilesRequest;
                    })();
    
                    v1.AsyncBatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IAsyncBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1.IAsyncAnnotateFileResponse>|null} [responses] AsyncBatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AsyncBatchAnnotateFilesResponse.
                         * @implements IAsyncBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1.IAsyncAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse instance
                         */
                        AsyncBatchAnnotateFilesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1.AsyncAnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1.AsyncAnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.AsyncAnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         */
                        AsyncBatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1.AsyncAnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1.AsyncAnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse";
                        };
    
                        return AsyncBatchAnnotateFilesResponse;
                    })();
    
                    v1.InputConfig = (function() {
    
                        /**
                         * Properties of an InputConfig.
                         * @memberof google.cloud.vision.v1
                         * @interface IInputConfig
                         * @property {google.cloud.vision.v1.IGcsSource|null} [gcsSource] InputConfig gcsSource
                         * @property {Uint8Array|null} [content] InputConfig content
                         * @property {string|null} [mimeType] InputConfig mimeType
                         */
    
                        /**
                         * Constructs a new InputConfig.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an InputConfig.
                         * @implements IInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1.IInputConfig=} [properties] Properties to set
                         */
                        function InputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * InputConfig gcsSource.
                         * @member {google.cloud.vision.v1.IGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.gcsSource = null;
    
                        /**
                         * InputConfig content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.content = $util.newBuffer([]);
    
                        /**
                         * InputConfig mimeType.
                         * @member {string} mimeType
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.mimeType = "";
    
                        /**
                         * Creates a new InputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.InputConfig} InputConfig instance
                         */
                        InputConfig.create = function create(properties) {
                            return new InputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.vision.v1.InputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.content);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1.InputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.InputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1.GcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.mimeType = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an InputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        InputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                var error = $root.google.cloud.vision.v1.GcsSource.verify(message.gcsSource);
                                if (error)
                                    return "gcsSource." + error;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                if (!$util.isString(message.mimeType))
                                    return "mimeType: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an InputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.InputConfig} InputConfig
                         */
                        InputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.InputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1.InputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1.InputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1.GcsSource.fromObject(object.gcsSource);
                            }
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.mimeType != null)
                                message.mimeType = String(object.mimeType);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1.InputConfig} message InputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        InputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsSource = null;
                                object.mimeType = "";
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                            }
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource"))
                                object.gcsSource = $root.google.cloud.vision.v1.GcsSource.toObject(message.gcsSource, options);
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                object.mimeType = message.mimeType;
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            return object;
                        };
    
                        /**
                         * Converts this InputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        InputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for InputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.InputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.InputConfig";
                        };
    
                        return InputConfig;
                    })();
    
                    v1.OutputConfig = (function() {
    
                        /**
                         * Properties of an OutputConfig.
                         * @memberof google.cloud.vision.v1
                         * @interface IOutputConfig
                         * @property {google.cloud.vision.v1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination
                         * @property {number|null} [batchSize] OutputConfig batchSize
                         */
    
                        /**
                         * Constructs a new OutputConfig.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an OutputConfig.
                         * @implements IOutputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1.IOutputConfig=} [properties] Properties to set
                         */
                        function OutputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OutputConfig gcsDestination.
                         * @member {google.cloud.vision.v1.IGcsDestination|null|undefined} gcsDestination
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.gcsDestination = null;
    
                        /**
                         * OutputConfig batchSize.
                         * @member {number} batchSize
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.batchSize = 0;
    
                        /**
                         * Creates a new OutputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IOutputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.OutputConfig} OutputConfig instance
                         */
                        OutputConfig.create = function create(properties) {
                            return new OutputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.vision.v1.OutputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination"))
                                $root.google.cloud.vision.v1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.batchSize != null && Object.hasOwnProperty.call(message, "batchSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchSize);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1.OutputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.OutputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsDestination = $root.google.cloud.vision.v1.GcsDestination.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.batchSize = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OutputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OutputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
                                var error = $root.google.cloud.vision.v1.GcsDestination.verify(message.gcsDestination);
                                if (error)
                                    return "gcsDestination." + error;
                            }
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                if (!$util.isInteger(message.batchSize))
                                    return "batchSize: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.OutputConfig} OutputConfig
                         */
                        OutputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.OutputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1.OutputConfig();
                            if (object.gcsDestination != null) {
                                if (typeof object.gcsDestination !== "object")
                                    throw TypeError(".google.cloud.vision.v1.OutputConfig.gcsDestination: object expected");
                                message.gcsDestination = $root.google.cloud.vision.v1.GcsDestination.fromObject(object.gcsDestination);
                            }
                            if (object.batchSize != null)
                                message.batchSize = object.batchSize | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1.OutputConfig} message OutputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OutputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsDestination = null;
                                object.batchSize = 0;
                            }
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination"))
                                object.gcsDestination = $root.google.cloud.vision.v1.GcsDestination.toObject(message.gcsDestination, options);
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                object.batchSize = message.batchSize;
                            return object;
                        };
    
                        /**
                         * Converts this OutputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OutputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OutputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.OutputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.OutputConfig";
                        };
    
                        return OutputConfig;
                    })();
    
                    v1.GcsSource = (function() {
    
                        /**
                         * Properties of a GcsSource.
                         * @memberof google.cloud.vision.v1
                         * @interface IGcsSource
                         * @property {string|null} [uri] GcsSource uri
                         */
    
                        /**
                         * Constructs a new GcsSource.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a GcsSource.
                         * @implements IGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1.IGcsSource=} [properties] Properties to set
                         */
                        function GcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsSource uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @instance
                         */
                        GcsSource.prototype.uri = "";
    
                        /**
                         * Creates a new GcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.GcsSource} GcsSource instance
                         */
                        GcsSource.create = function create(properties) {
                            return new GcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.vision.v1.GcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1.GcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.GcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.GcsSource} GcsSource
                         */
                        GcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.GcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1.GcsSource();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1.GcsSource} message GcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.GcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.GcsSource";
                        };
    
                        return GcsSource;
                    })();
    
                    v1.GcsDestination = (function() {
    
                        /**
                         * Properties of a GcsDestination.
                         * @memberof google.cloud.vision.v1
                         * @interface IGcsDestination
                         * @property {string|null} [uri] GcsDestination uri
                         */
    
                        /**
                         * Constructs a new GcsDestination.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a GcsDestination.
                         * @implements IGcsDestination
                         * @constructor
                         * @param {google.cloud.vision.v1.IGcsDestination=} [properties] Properties to set
                         */
                        function GcsDestination(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsDestination uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @instance
                         */
                        GcsDestination.prototype.uri = "";
    
                        /**
                         * Creates a new GcsDestination instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1.IGcsDestination=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.GcsDestination} GcsDestination instance
                         */
                        GcsDestination.create = function create(properties) {
                            return new GcsDestination(properties);
                        };
    
                        /**
                         * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.vision.v1.GcsDestination.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.vision.v1.GcsDestination.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.GcsDestination();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsDestination message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsDestination.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.GcsDestination} GcsDestination
                         */
                        GcsDestination.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.GcsDestination)
                                return object;
                            var message = new $root.google.cloud.vision.v1.GcsDestination();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1.GcsDestination} message GcsDestination
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsDestination.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsDestination to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsDestination.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsDestination
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.GcsDestination
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.GcsDestination";
                        };
    
                        return GcsDestination;
                    })();
    
                    v1.OperationMetadata = (function() {
    
                        /**
                         * Properties of an OperationMetadata.
                         * @memberof google.cloud.vision.v1
                         * @interface IOperationMetadata
                         * @property {google.cloud.vision.v1.OperationMetadata.State|null} [state] OperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime
                         * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime
                         */
    
                        /**
                         * Constructs a new OperationMetadata.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an OperationMetadata.
                         * @implements IOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1.IOperationMetadata=} [properties] Properties to set
                         */
                        function OperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OperationMetadata state.
                         * @member {google.cloud.vision.v1.OperationMetadata.State} state
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.state = 0;
    
                        /**
                         * OperationMetadata createTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} createTime
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.createTime = null;
    
                        /**
                         * OperationMetadata updateTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} updateTime
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.updateTime = null;
    
                        /**
                         * Creates a new OperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.OperationMetadata} OperationMetadata instance
                         */
                        OperationMetadata.create = function create(properties) {
                            return new OperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.vision.v1.OperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
                                $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
                                $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1.OperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.OperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.createTime != null && message.hasOwnProperty("createTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.createTime);
                                if (error)
                                    return "createTime." + error;
                            }
                            if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
                                if (error)
                                    return "updateTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.OperationMetadata} OperationMetadata
                         */
                        OperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.OperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1.OperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "CREATED":
                            case 1:
                                message.state = 1;
                                break;
                            case "RUNNING":
                            case 2:
                                message.state = 2;
                                break;
                            case "DONE":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.createTime != null) {
                                if (typeof object.createTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.OperationMetadata.createTime: object expected");
                                message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
                            }
                            if (object.updateTime != null) {
                                if (typeof object.updateTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.OperationMetadata.updateTime: object expected");
                                message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.OperationMetadata} message OperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.createTime = null;
                                object.updateTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1.OperationMetadata.State[message.state] : message.state;
                            if (message.createTime != null && message.hasOwnProperty("createTime"))
                                object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
                            if (message.updateTime != null && message.hasOwnProperty("updateTime"))
                                object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this OperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.OperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.OperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1.OperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} CREATED=1 CREATED value
                         * @property {number} RUNNING=2 RUNNING value
                         * @property {number} DONE=3 DONE value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        OperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "CREATED"] = 1;
                            values[valuesById[2] = "RUNNING"] = 2;
                            values[valuesById[3] = "DONE"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return OperationMetadata;
                    })();
    
                    v1.ProductSearchParams = (function() {
    
                        /**
                         * Properties of a ProductSearchParams.
                         * @memberof google.cloud.vision.v1
                         * @interface IProductSearchParams
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] ProductSearchParams boundingPoly
                         * @property {string|null} [productSet] ProductSearchParams productSet
                         * @property {Array.<string>|null} [productCategories] ProductSearchParams productCategories
                         * @property {string|null} [filter] ProductSearchParams filter
                         */
    
                        /**
                         * Constructs a new ProductSearchParams.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ProductSearchParams.
                         * @implements IProductSearchParams
                         * @constructor
                         * @param {google.cloud.vision.v1.IProductSearchParams=} [properties] Properties to set
                         */
                        function ProductSearchParams(properties) {
                            this.productCategories = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchParams boundingPoly.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.boundingPoly = null;
    
                        /**
                         * ProductSearchParams productSet.
                         * @member {string} productSet
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productSet = "";
    
                        /**
                         * ProductSearchParams productCategories.
                         * @member {Array.<string>} productCategories
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productCategories = $util.emptyArray;
    
                        /**
                         * ProductSearchParams filter.
                         * @member {string} filter
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.filter = "";
    
                        /**
                         * Creates a new ProductSearchParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ProductSearchParams} ProductSearchParams instance
                         */
                        ProductSearchParams.create = function create(properties) {
                            return new ProductSearchParams(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message. Does not implicitly {@link google.cloud.vision.v1.ProductSearchParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.productSet);
                            if (message.productCategories != null && message.productCategories.length)
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.productCategories[i]);
                            if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
                                writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSearchParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSearchParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.productSet = reader.string();
                                        break;
                                    }
                                case 7: {
                                        if (!(message.productCategories && message.productCategories.length))
                                            message.productCategories = [];
                                        message.productCategories.push(reader.string());
                                        break;
                                    }
                                case 8: {
                                        message.filter = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                if (!$util.isString(message.productSet))
                                    return "productSet: string expected";
                            if (message.productCategories != null && message.hasOwnProperty("productCategories")) {
                                if (!Array.isArray(message.productCategories))
                                    return "productCategories: array expected";
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    if (!$util.isString(message.productCategories[i]))
                                        return "productCategories: string[] expected";
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                if (!$util.isString(message.filter))
                                    return "filter: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ProductSearchParams} ProductSearchParams
                         */
                        ProductSearchParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ProductSearchParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ProductSearchParams();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ProductSearchParams.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.productSet != null)
                                message.productSet = String(object.productSet);
                            if (object.productCategories) {
                                if (!Array.isArray(object.productCategories))
                                    throw TypeError(".google.cloud.vision.v1.ProductSearchParams.productCategories: array expected");
                                message.productCategories = [];
                                for (var i = 0; i < object.productCategories.length; ++i)
                                    message.productCategories[i] = String(object.productCategories[i]);
                            }
                            if (object.filter != null)
                                message.filter = String(object.filter);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1.ProductSearchParams} message ProductSearchParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productCategories = [];
                            if (options.defaults) {
                                object.productSet = "";
                                object.filter = "";
                                object.boundingPoly = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = message.productSet;
                            if (message.productCategories && message.productCategories.length) {
                                object.productCategories = [];
                                for (var j = 0; j < message.productCategories.length; ++j)
                                    object.productCategories[j] = message.productCategories[j];
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                object.filter = message.filter;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ProductSearchParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ProductSearchParams";
                        };
    
                        return ProductSearchParams;
                    })();
    
                    v1.ProductSearchResults = (function() {
    
                        /**
                         * Properties of a ProductSearchResults.
                         * @memberof google.cloud.vision.v1
                         * @interface IProductSearchResults
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSearchResults indexTime
                         * @property {Array.<google.cloud.vision.v1.ProductSearchResults.IResult>|null} [results] ProductSearchResults results
                         * @property {Array.<google.cloud.vision.v1.ProductSearchResults.IGroupedResult>|null} [productGroupedResults] ProductSearchResults productGroupedResults
                         */
    
                        /**
                         * Constructs a new ProductSearchResults.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ProductSearchResults.
                         * @implements IProductSearchResults
                         * @constructor
                         * @param {google.cloud.vision.v1.IProductSearchResults=} [properties] Properties to set
                         */
                        function ProductSearchResults(properties) {
                            this.results = [];
                            this.productGroupedResults = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchResults indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.indexTime = null;
    
                        /**
                         * ProductSearchResults results.
                         * @member {Array.<google.cloud.vision.v1.ProductSearchResults.IResult>} results
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.results = $util.emptyArray;
    
                        /**
                         * ProductSearchResults productGroupedResults.
                         * @member {Array.<google.cloud.vision.v1.ProductSearchResults.IGroupedResult>} productGroupedResults
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.productGroupedResults = $util.emptyArray;
    
                        /**
                         * Creates a new ProductSearchResults instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchResults=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ProductSearchResults} ProductSearchResults instance
                         */
                        ProductSearchResults.create = function create(properties) {
                            return new ProductSearchResults(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.results != null && message.results.length)
                                for (var i = 0; i < message.results.length; ++i)
                                    $root.google.cloud.vision.v1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.productGroupedResults != null && message.productGroupedResults.length)
                                for (var i = 0; i < message.productGroupedResults.length; ++i)
                                    $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult.encode(message.productGroupedResults[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSearchResults();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        if (!(message.results && message.results.length))
                                            message.results = [];
                                        message.results.push($root.google.cloud.vision.v1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.productGroupedResults && message.productGroupedResults.length))
                                            message.productGroupedResults = [];
                                        message.productGroupedResults.push($root.google.cloud.vision.v1.ProductSearchResults.GroupedResult.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchResults message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchResults.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.results != null && message.hasOwnProperty("results")) {
                                if (!Array.isArray(message.results))
                                    return "results: array expected";
                                for (var i = 0; i < message.results.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ProductSearchResults.Result.verify(message.results[i]);
                                    if (error)
                                        return "results." + error;
                                }
                            }
                            if (message.productGroupedResults != null && message.hasOwnProperty("productGroupedResults")) {
                                if (!Array.isArray(message.productGroupedResults))
                                    return "productGroupedResults: array expected";
                                for (var i = 0; i < message.productGroupedResults.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult.verify(message.productGroupedResults[i]);
                                    if (error)
                                        return "productGroupedResults." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchResults message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ProductSearchResults} ProductSearchResults
                         */
                        ProductSearchResults.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ProductSearchResults)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ProductSearchResults();
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ProductSearchResults.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.results) {
                                if (!Array.isArray(object.results))
                                    throw TypeError(".google.cloud.vision.v1.ProductSearchResults.results: array expected");
                                message.results = [];
                                for (var i = 0; i < object.results.length; ++i) {
                                    if (typeof object.results[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.results: object expected");
                                    message.results[i] = $root.google.cloud.vision.v1.ProductSearchResults.Result.fromObject(object.results[i]);
                                }
                            }
                            if (object.productGroupedResults) {
                                if (!Array.isArray(object.productGroupedResults))
                                    throw TypeError(".google.cloud.vision.v1.ProductSearchResults.productGroupedResults: array expected");
                                message.productGroupedResults = [];
                                for (var i = 0; i < object.productGroupedResults.length; ++i) {
                                    if (typeof object.productGroupedResults[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.productGroupedResults: object expected");
                                    message.productGroupedResults[i] = $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult.fromObject(object.productGroupedResults[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchResults message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1.ProductSearchResults} message ProductSearchResults
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchResults.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.results = [];
                                object.productGroupedResults = [];
                            }
                            if (options.defaults)
                                object.indexTime = null;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.results && message.results.length) {
                                object.results = [];
                                for (var j = 0; j < message.results.length; ++j)
                                    object.results[j] = $root.google.cloud.vision.v1.ProductSearchResults.Result.toObject(message.results[j], options);
                            }
                            if (message.productGroupedResults && message.productGroupedResults.length) {
                                object.productGroupedResults = [];
                                for (var j = 0; j < message.productGroupedResults.length; ++j)
                                    object.productGroupedResults[j] = $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult.toObject(message.productGroupedResults[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchResults to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchResults.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchResults
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ProductSearchResults
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ProductSearchResults";
                        };
    
                        ProductSearchResults.Result = (function() {
    
                            /**
                             * Properties of a Result.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @interface IResult
                             * @property {google.cloud.vision.v1.IProduct|null} [product] Result product
                             * @property {number|null} [score] Result score
                             * @property {string|null} [image] Result image
                             */
    
                            /**
                             * Constructs a new Result.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @classdesc Represents a Result.
                             * @implements IResult
                             * @constructor
                             * @param {google.cloud.vision.v1.ProductSearchResults.IResult=} [properties] Properties to set
                             */
                            function Result(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Result product.
                             * @member {google.cloud.vision.v1.IProduct|null|undefined} product
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.product = null;
    
                            /**
                             * Result score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.score = 0;
    
                            /**
                             * Result image.
                             * @member {string} image
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.image = "";
    
                            /**
                             * Creates a new Result instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.ProductSearchResults.Result} Result instance
                             */
                            Result.create = function create(properties) {
                                return new Result(properties);
                            };
    
                            /**
                             * Encodes the specified Result message. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                    $root.google.cloud.vision.v1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.image);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSearchResults.Result();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.product = $root.google.cloud.vision.v1.Product.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.image = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Result message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Result.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.product != null && message.hasOwnProperty("product")) {
                                    var error = $root.google.cloud.vision.v1.Product.verify(message.product);
                                    if (error)
                                        return "product." + error;
                                }
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.image != null && message.hasOwnProperty("image"))
                                    if (!$util.isString(message.image))
                                        return "image: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a Result message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.ProductSearchResults.Result} Result
                             */
                            Result.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.ProductSearchResults.Result)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.ProductSearchResults.Result();
                                if (object.product != null) {
                                    if (typeof object.product !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.Result.product: object expected");
                                    message.product = $root.google.cloud.vision.v1.Product.fromObject(object.product);
                                }
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.image != null)
                                    message.image = String(object.image);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Result message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.Result} message Result
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Result.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.product = null;
                                    object.score = 0;
                                    object.image = "";
                                }
                                if (message.product != null && message.hasOwnProperty("product"))
                                    object.product = $root.google.cloud.vision.v1.Product.toObject(message.product, options);
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.image != null && message.hasOwnProperty("image"))
                                    object.image = message.image;
                                return object;
                            };
    
                            /**
                             * Converts this Result to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Result.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Result
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.ProductSearchResults.Result
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.ProductSearchResults.Result";
                            };
    
                            return Result;
                        })();
    
                        ProductSearchResults.ObjectAnnotation = (function() {
    
                            /**
                             * Properties of an ObjectAnnotation.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @interface IObjectAnnotation
                             * @property {string|null} [mid] ObjectAnnotation mid
                             * @property {string|null} [languageCode] ObjectAnnotation languageCode
                             * @property {string|null} [name] ObjectAnnotation name
                             * @property {number|null} [score] ObjectAnnotation score
                             */
    
                            /**
                             * Constructs a new ObjectAnnotation.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @classdesc Represents an ObjectAnnotation.
                             * @implements IObjectAnnotation
                             * @constructor
                             * @param {google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             */
                            function ObjectAnnotation(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * ObjectAnnotation mid.
                             * @member {string} mid
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.mid = "";
    
                            /**
                             * ObjectAnnotation languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.languageCode = "";
    
                            /**
                             * ObjectAnnotation name.
                             * @member {string} name
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.name = "";
    
                            /**
                             * ObjectAnnotation score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.score = 0;
    
                            /**
                             * Creates a new ObjectAnnotation instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation instance
                             */
                            ObjectAnnotation.create = function create(properties) {
                                return new ObjectAnnotation(properties);
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.mid = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 3: {
                                            message.name = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies an ObjectAnnotation message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            ObjectAnnotation.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    if (!$util.isString(message.mid))
                                        return "mid: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.name != null && message.hasOwnProperty("name"))
                                    if (!$util.isString(message.name))
                                        return "name: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates an ObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             */
                            ObjectAnnotation.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation();
                                if (object.mid != null)
                                    message.mid = String(object.mid);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.name != null)
                                    message.name = String(object.name);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from an ObjectAnnotation message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation} message ObjectAnnotation
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            ObjectAnnotation.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.mid = "";
                                    object.languageCode = "";
                                    object.name = "";
                                    object.score = 0;
                                }
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    object.mid = message.mid;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.name != null && message.hasOwnProperty("name"))
                                    object.name = message.name;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this ObjectAnnotation to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            ObjectAnnotation.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for ObjectAnnotation
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            ObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation";
                            };
    
                            return ObjectAnnotation;
                        })();
    
                        ProductSearchResults.GroupedResult = (function() {
    
                            /**
                             * Properties of a GroupedResult.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @interface IGroupedResult
                             * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingPoly] GroupedResult boundingPoly
                             * @property {Array.<google.cloud.vision.v1.ProductSearchResults.IResult>|null} [results] GroupedResult results
                             * @property {Array.<google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation>|null} [objectAnnotations] GroupedResult objectAnnotations
                             */
    
                            /**
                             * Constructs a new GroupedResult.
                             * @memberof google.cloud.vision.v1.ProductSearchResults
                             * @classdesc Represents a GroupedResult.
                             * @implements IGroupedResult
                             * @constructor
                             * @param {google.cloud.vision.v1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             */
                            function GroupedResult(properties) {
                                this.results = [];
                                this.objectAnnotations = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * GroupedResult boundingPoly.
                             * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingPoly
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.boundingPoly = null;
    
                            /**
                             * GroupedResult results.
                             * @member {Array.<google.cloud.vision.v1.ProductSearchResults.IResult>} results
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.results = $util.emptyArray;
    
                            /**
                             * GroupedResult objectAnnotations.
                             * @member {Array.<google.cloud.vision.v1.ProductSearchResults.IObjectAnnotation>} objectAnnotations
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.objectAnnotations = $util.emptyArray;
    
                            /**
                             * Creates a new GroupedResult instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.ProductSearchResults.GroupedResult} GroupedResult instance
                             */
                            GroupedResult.create = function create(properties) {
                                return new GroupedResult(properties);
                            };
    
                            /**
                             * Encodes the specified GroupedResult message. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                    $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.results != null && message.results.length)
                                    for (var i = 0; i < message.results.length; ++i)
                                        $root.google.cloud.vision.v1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                if (message.objectAnnotations != null && message.objectAnnotations.length)
                                    for (var i = 0; i < message.objectAnnotations.length; ++i)
                                        $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.encode(message.objectAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified GroupedResult message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            if (!(message.results && message.results.length))
                                                message.results = [];
                                            message.results.push($root.google.cloud.vision.v1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 3: {
                                            if (!(message.objectAnnotations && message.objectAnnotations.length))
                                                message.objectAnnotations = [];
                                            message.objectAnnotations.push($root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a GroupedResult message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            GroupedResult.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                    var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPoly);
                                    if (error)
                                        return "boundingPoly." + error;
                                }
                                if (message.results != null && message.hasOwnProperty("results")) {
                                    if (!Array.isArray(message.results))
                                        return "results: array expected";
                                    for (var i = 0; i < message.results.length; ++i) {
                                        var error = $root.google.cloud.vision.v1.ProductSearchResults.Result.verify(message.results[i]);
                                        if (error)
                                            return "results." + error;
                                    }
                                }
                                if (message.objectAnnotations != null && message.hasOwnProperty("objectAnnotations")) {
                                    if (!Array.isArray(message.objectAnnotations))
                                        return "objectAnnotations: array expected";
                                    for (var i = 0; i < message.objectAnnotations.length; ++i) {
                                        var error = $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.verify(message.objectAnnotations[i]);
                                        if (error)
                                            return "objectAnnotations." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a GroupedResult message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.ProductSearchResults.GroupedResult} GroupedResult
                             */
                            GroupedResult.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.ProductSearchResults.GroupedResult();
                                if (object.boundingPoly != null) {
                                    if (typeof object.boundingPoly !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.GroupedResult.boundingPoly: object expected");
                                    message.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPoly);
                                }
                                if (object.results) {
                                    if (!Array.isArray(object.results))
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.GroupedResult.results: array expected");
                                    message.results = [];
                                    for (var i = 0; i < object.results.length; ++i) {
                                        if (typeof object.results[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1.ProductSearchResults.GroupedResult.results: object expected");
                                        message.results[i] = $root.google.cloud.vision.v1.ProductSearchResults.Result.fromObject(object.results[i]);
                                    }
                                }
                                if (object.objectAnnotations) {
                                    if (!Array.isArray(object.objectAnnotations))
                                        throw TypeError(".google.cloud.vision.v1.ProductSearchResults.GroupedResult.objectAnnotations: array expected");
                                    message.objectAnnotations = [];
                                    for (var i = 0; i < object.objectAnnotations.length; ++i) {
                                        if (typeof object.objectAnnotations[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1.ProductSearchResults.GroupedResult.objectAnnotations: object expected");
                                        message.objectAnnotations[i] = $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.fromObject(object.objectAnnotations[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a GroupedResult message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1.ProductSearchResults.GroupedResult} message GroupedResult
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            GroupedResult.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.results = [];
                                    object.objectAnnotations = [];
                                }
                                if (options.defaults)
                                    object.boundingPoly = null;
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                    object.boundingPoly = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPoly, options);
                                if (message.results && message.results.length) {
                                    object.results = [];
                                    for (var j = 0; j < message.results.length; ++j)
                                        object.results[j] = $root.google.cloud.vision.v1.ProductSearchResults.Result.toObject(message.results[j], options);
                                }
                                if (message.objectAnnotations && message.objectAnnotations.length) {
                                    object.objectAnnotations = [];
                                    for (var j = 0; j < message.objectAnnotations.length; ++j)
                                        object.objectAnnotations[j] = $root.google.cloud.vision.v1.ProductSearchResults.ObjectAnnotation.toObject(message.objectAnnotations[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this GroupedResult to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            GroupedResult.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for GroupedResult
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            GroupedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.ProductSearchResults.GroupedResult";
                            };
    
                            return GroupedResult;
                        })();
    
                        return ProductSearchResults;
                    })();
    
                    v1.ProductSearch = (function() {
    
                        /**
                         * Constructs a new ProductSearch service.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ProductSearch
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ProductSearch(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ProductSearch.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ProductSearch;
    
                        /**
                         * Creates new ProductSearch service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ProductSearch} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ProductSearch.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|createProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef CreateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.CreateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProductSet = function createProductSet(request, callback) {
                            return this.rpcCall(createProductSet, $root.google.cloud.vision.v1.CreateProductSetRequest, $root.google.cloud.vision.v1.ProductSet, request, callback);
                        }, "name", { value: "CreateProductSet" });
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|listProductSets}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef ListProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ListProductSetsResponse} [response] ListProductSetsResponse
                         */
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.ListProductSetsCallback} callback Node-style callback called with the error, if any, and ListProductSetsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductSets = function listProductSets(request, callback) {
                            return this.rpcCall(listProductSets, $root.google.cloud.vision.v1.ListProductSetsRequest, $root.google.cloud.vision.v1.ListProductSetsResponse, request, callback);
                        }, "name", { value: "ListProductSets" });
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ListProductSetsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|getProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef GetProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.GetProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProductSet = function getProductSet(request, callback) {
                            return this.rpcCall(getProductSet, $root.google.cloud.vision.v1.GetProductSetRequest, $root.google.cloud.vision.v1.ProductSet, request, callback);
                        }, "name", { value: "GetProductSet" });
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|updateProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef UpdateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.UpdateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProductSet = function updateProductSet(request, callback) {
                            return this.rpcCall(updateProductSet, $root.google.cloud.vision.v1.UpdateProductSetRequest, $root.google.cloud.vision.v1.ProductSet, request, callback);
                        }, "name", { value: "UpdateProductSet" });
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|deleteProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef DeleteProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.DeleteProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProductSet = function deleteProductSet(request, callback) {
                            return this.rpcCall(deleteProductSet, $root.google.cloud.vision.v1.DeleteProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProductSet" });
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|createProduct}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef CreateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.Product} [response] Product
                         */
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.CreateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProduct = function createProduct(request, callback) {
                            return this.rpcCall(createProduct, $root.google.cloud.vision.v1.CreateProductRequest, $root.google.cloud.vision.v1.Product, request, callback);
                        }, "name", { value: "CreateProduct" });
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|listProducts}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef ListProductsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ListProductsResponse} [response] ListProductsResponse
                         */
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.ListProductsCallback} callback Node-style callback called with the error, if any, and ListProductsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProducts = function listProducts(request, callback) {
                            return this.rpcCall(listProducts, $root.google.cloud.vision.v1.ListProductsRequest, $root.google.cloud.vision.v1.ListProductsResponse, request, callback);
                        }, "name", { value: "ListProducts" });
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ListProductsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|getProduct}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef GetProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.Product} [response] Product
                         */
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetProductRequest} request GetProductRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.GetProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProduct = function getProduct(request, callback) {
                            return this.rpcCall(getProduct, $root.google.cloud.vision.v1.GetProductRequest, $root.google.cloud.vision.v1.Product, request, callback);
                        }, "name", { value: "GetProduct" });
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetProductRequest} request GetProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|updateProduct}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef UpdateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.Product} [response] Product
                         */
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.UpdateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProduct = function updateProduct(request, callback) {
                            return this.rpcCall(updateProduct, $root.google.cloud.vision.v1.UpdateProductRequest, $root.google.cloud.vision.v1.Product, request, callback);
                        }, "name", { value: "UpdateProduct" });
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|deleteProduct}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef DeleteProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.DeleteProductCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProduct = function deleteProduct(request, callback) {
                            return this.rpcCall(deleteProduct, $root.google.cloud.vision.v1.DeleteProductRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProduct" });
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|createReferenceImage}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef CreateReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.CreateReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createReferenceImage = function createReferenceImage(request, callback) {
                            return this.rpcCall(createReferenceImage, $root.google.cloud.vision.v1.CreateReferenceImageRequest, $root.google.cloud.vision.v1.ReferenceImage, request, callback);
                        }, "name", { value: "CreateReferenceImage" });
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|deleteReferenceImage}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef DeleteReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.DeleteReferenceImageCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteReferenceImage = function deleteReferenceImage(request, callback) {
                            return this.rpcCall(deleteReferenceImage, $root.google.cloud.vision.v1.DeleteReferenceImageRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteReferenceImage" });
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|listReferenceImages}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef ListReferenceImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ListReferenceImagesResponse} [response] ListReferenceImagesResponse
                         */
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.ListReferenceImagesCallback} callback Node-style callback called with the error, if any, and ListReferenceImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listReferenceImages = function listReferenceImages(request, callback) {
                            return this.rpcCall(listReferenceImages, $root.google.cloud.vision.v1.ListReferenceImagesRequest, $root.google.cloud.vision.v1.ListReferenceImagesResponse, request, callback);
                        }, "name", { value: "ListReferenceImages" });
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ListReferenceImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|getReferenceImage}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef GetReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.GetReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getReferenceImage = function getReferenceImage(request, callback) {
                            return this.rpcCall(getReferenceImage, $root.google.cloud.vision.v1.GetReferenceImageRequest, $root.google.cloud.vision.v1.ReferenceImage, request, callback);
                        }, "name", { value: "GetReferenceImage" });
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|addProductToProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef AddProductToProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.AddProductToProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.addProductToProductSet = function addProductToProductSet(request, callback) {
                            return this.rpcCall(addProductToProductSet, $root.google.cloud.vision.v1.AddProductToProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "AddProductToProductSet" });
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|removeProductFromProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef RemoveProductFromProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.RemoveProductFromProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.removeProductFromProductSet = function removeProductFromProductSet(request, callback) {
                            return this.rpcCall(removeProductFromProductSet, $root.google.cloud.vision.v1.RemoveProductFromProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "RemoveProductFromProductSet" });
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|listProductsInProductSet}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef ListProductsInProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1.ListProductsInProductSetResponse} [response] ListProductsInProductSetResponse
                         */
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.ListProductsInProductSetCallback} callback Node-style callback called with the error, if any, and ListProductsInProductSetResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductsInProductSet = function listProductsInProductSet(request, callback) {
                            return this.rpcCall(listProductsInProductSet, $root.google.cloud.vision.v1.ListProductsInProductSetRequest, $root.google.cloud.vision.v1.ListProductsInProductSetResponse, request, callback);
                        }, "name", { value: "ListProductsInProductSet" });
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1.ListProductsInProductSetResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|importProductSets}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef ImportProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.ImportProductSetsCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.importProductSets = function importProductSets(request, callback) {
                            return this.rpcCall(importProductSets, $root.google.cloud.vision.v1.ImportProductSetsRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "ImportProductSets" });
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1.ProductSearch|purgeProducts}.
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @typedef PurgeProductsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls PurgeProducts.
                         * @function purgeProducts
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest} request PurgeProductsRequest message or plain object
                         * @param {google.cloud.vision.v1.ProductSearch.PurgeProductsCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.purgeProducts = function purgeProducts(request, callback) {
                            return this.rpcCall(purgeProducts, $root.google.cloud.vision.v1.PurgeProductsRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "PurgeProducts" });
    
                        /**
                         * Calls PurgeProducts.
                         * @function purgeProducts
                         * @memberof google.cloud.vision.v1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest} request PurgeProductsRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ProductSearch;
                    })();
    
                    v1.Product = (function() {
    
                        /**
                         * Properties of a Product.
                         * @memberof google.cloud.vision.v1
                         * @interface IProduct
                         * @property {string|null} [name] Product name
                         * @property {string|null} [displayName] Product displayName
                         * @property {string|null} [description] Product description
                         * @property {string|null} [productCategory] Product productCategory
                         * @property {Array.<google.cloud.vision.v1.Product.IKeyValue>|null} [productLabels] Product productLabels
                         */
    
                        /**
                         * Constructs a new Product.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Product.
                         * @implements IProduct
                         * @constructor
                         * @param {google.cloud.vision.v1.IProduct=} [properties] Properties to set
                         */
                        function Product(properties) {
                            this.productLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Product name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         */
                        Product.prototype.name = "";
    
                        /**
                         * Product displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         */
                        Product.prototype.displayName = "";
    
                        /**
                         * Product description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         */
                        Product.prototype.description = "";
    
                        /**
                         * Product productCategory.
                         * @member {string} productCategory
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         */
                        Product.prototype.productCategory = "";
    
                        /**
                         * Product productLabels.
                         * @member {Array.<google.cloud.vision.v1.Product.IKeyValue>} productLabels
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         */
                        Product.prototype.productLabels = $util.emptyArray;
    
                        /**
                         * Creates a new Product instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {google.cloud.vision.v1.IProduct=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Product} Product instance
                         */
                        Product.create = function create(properties) {
                            return new Product(properties);
                        };
    
                        /**
                         * Encodes the specified Product message. Does not implicitly {@link google.cloud.vision.v1.Product.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {google.cloud.vision.v1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.productCategory != null && Object.hasOwnProperty.call(message, "productCategory"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.productCategory);
                            if (message.productLabels != null && message.productLabels.length)
                                for (var i = 0; i < message.productLabels.length; ++i)
                                    $root.google.cloud.vision.v1.Product.KeyValue.encode(message.productLabels[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Product message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Product.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {google.cloud.vision.v1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Product();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.productCategory = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (!(message.productLabels && message.productLabels.length))
                                            message.productLabels = [];
                                        message.productLabels.push($root.google.cloud.vision.v1.Product.KeyValue.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Product message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Product.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                if (!$util.isString(message.productCategory))
                                    return "productCategory: string expected";
                            if (message.productLabels != null && message.hasOwnProperty("productLabels")) {
                                if (!Array.isArray(message.productLabels))
                                    return "productLabels: array expected";
                                for (var i = 0; i < message.productLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Product.KeyValue.verify(message.productLabels[i]);
                                    if (error)
                                        return "productLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a Product message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Product} Product
                         */
                        Product.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Product)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Product();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.productCategory != null)
                                message.productCategory = String(object.productCategory);
                            if (object.productLabels) {
                                if (!Array.isArray(object.productLabels))
                                    throw TypeError(".google.cloud.vision.v1.Product.productLabels: array expected");
                                message.productLabels = [];
                                for (var i = 0; i < object.productLabels.length; ++i) {
                                    if (typeof object.productLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.Product.productLabels: object expected");
                                    message.productLabels[i] = $root.google.cloud.vision.v1.Product.KeyValue.fromObject(object.productLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Product message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {google.cloud.vision.v1.Product} message Product
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Product.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productLabels = [];
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.description = "";
                                object.productCategory = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                object.productCategory = message.productCategory;
                            if (message.productLabels && message.productLabels.length) {
                                object.productLabels = [];
                                for (var j = 0; j < message.productLabels.length; ++j)
                                    object.productLabels[j] = $root.google.cloud.vision.v1.Product.KeyValue.toObject(message.productLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this Product to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Product
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Product.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Product
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Product
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Product";
                        };
    
                        Product.KeyValue = (function() {
    
                            /**
                             * Properties of a KeyValue.
                             * @memberof google.cloud.vision.v1.Product
                             * @interface IKeyValue
                             * @property {string|null} [key] KeyValue key
                             * @property {string|null} [value] KeyValue value
                             */
    
                            /**
                             * Constructs a new KeyValue.
                             * @memberof google.cloud.vision.v1.Product
                             * @classdesc Represents a KeyValue.
                             * @implements IKeyValue
                             * @constructor
                             * @param {google.cloud.vision.v1.Product.IKeyValue=} [properties] Properties to set
                             */
                            function KeyValue(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * KeyValue key.
                             * @member {string} key
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.key = "";
    
                            /**
                             * KeyValue value.
                             * @member {string} value
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.value = "";
    
                            /**
                             * Creates a new KeyValue instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1.Product.IKeyValue=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.Product.KeyValue} KeyValue instance
                             */
                            KeyValue.create = function create(properties) {
                                return new KeyValue(properties);
                            };
    
                            /**
                             * Encodes the specified KeyValue message. Does not implicitly {@link google.cloud.vision.v1.Product.KeyValue.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
                                if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Product.KeyValue.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Product.KeyValue();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.key = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.value = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a KeyValue message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            KeyValue.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.key != null && message.hasOwnProperty("key"))
                                    if (!$util.isString(message.key))
                                        return "key: string expected";
                                if (message.value != null && message.hasOwnProperty("value"))
                                    if (!$util.isString(message.value))
                                        return "value: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a KeyValue message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.Product.KeyValue} KeyValue
                             */
                            KeyValue.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.Product.KeyValue)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.Product.KeyValue();
                                if (object.key != null)
                                    message.key = String(object.key);
                                if (object.value != null)
                                    message.value = String(object.value);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a KeyValue message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1.Product.KeyValue} message KeyValue
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            KeyValue.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.key = "";
                                    object.value = "";
                                }
                                if (message.key != null && message.hasOwnProperty("key"))
                                    object.key = message.key;
                                if (message.value != null && message.hasOwnProperty("value"))
                                    object.value = message.value;
                                return object;
                            };
    
                            /**
                             * Converts this KeyValue to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            KeyValue.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for KeyValue
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.Product.KeyValue
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.Product.KeyValue";
                            };
    
                            return KeyValue;
                        })();
    
                        return Product;
                    })();
    
                    v1.ProductSet = (function() {
    
                        /**
                         * Properties of a ProductSet.
                         * @memberof google.cloud.vision.v1
                         * @interface IProductSet
                         * @property {string|null} [name] ProductSet name
                         * @property {string|null} [displayName] ProductSet displayName
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSet indexTime
                         * @property {google.rpc.IStatus|null} [indexError] ProductSet indexError
                         */
    
                        /**
                         * Constructs a new ProductSet.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ProductSet.
                         * @implements IProductSet
                         * @constructor
                         * @param {google.cloud.vision.v1.IProductSet=} [properties] Properties to set
                         */
                        function ProductSet(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSet name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.name = "";
    
                        /**
                         * ProductSet displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.displayName = "";
    
                        /**
                         * ProductSet indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexTime = null;
    
                        /**
                         * ProductSet indexError.
                         * @member {google.rpc.IStatus|null|undefined} indexError
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexError = null;
    
                        /**
                         * Creates a new ProductSet instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1.IProductSet=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ProductSet} ProductSet instance
                         */
                        ProductSet.create = function create(properties) {
                            return new ProductSet(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSet message. Does not implicitly {@link google.cloud.vision.v1.ProductSet.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.indexError != null && Object.hasOwnProperty.call(message, "indexError"))
                                $root.google.rpc.Status.encode(message.indexError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSet message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSet.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSet();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.indexError = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSet message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSet.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.indexError != null && message.hasOwnProperty("indexError")) {
                                var error = $root.google.rpc.Status.verify(message.indexError);
                                if (error)
                                    return "indexError." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSet message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ProductSet} ProductSet
                         */
                        ProductSet.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ProductSet)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ProductSet();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ProductSet.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.indexError != null) {
                                if (typeof object.indexError !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ProductSet.indexError: object expected");
                                message.indexError = $root.google.rpc.Status.fromObject(object.indexError);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSet message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1.ProductSet} message ProductSet
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSet.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.indexTime = null;
                                object.indexError = null;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.indexError != null && message.hasOwnProperty("indexError"))
                                object.indexError = $root.google.rpc.Status.toObject(message.indexError, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSet to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSet.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSet
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ProductSet
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ProductSet";
                        };
    
                        return ProductSet;
                    })();
    
                    v1.ReferenceImage = (function() {
    
                        /**
                         * Properties of a ReferenceImage.
                         * @memberof google.cloud.vision.v1
                         * @interface IReferenceImage
                         * @property {string|null} [name] ReferenceImage name
                         * @property {string|null} [uri] ReferenceImage uri
                         * @property {Array.<google.cloud.vision.v1.IBoundingPoly>|null} [boundingPolys] ReferenceImage boundingPolys
                         */
    
                        /**
                         * Constructs a new ReferenceImage.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ReferenceImage.
                         * @implements IReferenceImage
                         * @constructor
                         * @param {google.cloud.vision.v1.IReferenceImage=} [properties] Properties to set
                         */
                        function ReferenceImage(properties) {
                            this.boundingPolys = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ReferenceImage name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.name = "";
    
                        /**
                         * ReferenceImage uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.uri = "";
    
                        /**
                         * ReferenceImage boundingPolys.
                         * @member {Array.<google.cloud.vision.v1.IBoundingPoly>} boundingPolys
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.boundingPolys = $util.emptyArray;
    
                        /**
                         * Creates a new ReferenceImage instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1.IReferenceImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ReferenceImage} ReferenceImage instance
                         */
                        ReferenceImage.create = function create(properties) {
                            return new ReferenceImage(properties);
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message. Does not implicitly {@link google.cloud.vision.v1.ReferenceImage.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri);
                            if (message.boundingPolys != null && message.boundingPolys.length)
                                for (var i = 0; i < message.boundingPolys.length; ++i)
                                    $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingPolys[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ReferenceImage.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ReferenceImage();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 3: {
                                        if (!(message.boundingPolys && message.boundingPolys.length))
                                            message.boundingPolys = [];
                                        message.boundingPolys.push($root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ReferenceImage message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ReferenceImage.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.boundingPolys != null && message.hasOwnProperty("boundingPolys")) {
                                if (!Array.isArray(message.boundingPolys))
                                    return "boundingPolys: array expected";
                                for (var i = 0; i < message.boundingPolys.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingPolys[i]);
                                    if (error)
                                        return "boundingPolys." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ReferenceImage message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ReferenceImage} ReferenceImage
                         */
                        ReferenceImage.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ReferenceImage)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ReferenceImage();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.boundingPolys) {
                                if (!Array.isArray(object.boundingPolys))
                                    throw TypeError(".google.cloud.vision.v1.ReferenceImage.boundingPolys: array expected");
                                message.boundingPolys = [];
                                for (var i = 0; i < object.boundingPolys.length; ++i) {
                                    if (typeof object.boundingPolys[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ReferenceImage.boundingPolys: object expected");
                                    message.boundingPolys[i] = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingPolys[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ReferenceImage message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1.ReferenceImage} message ReferenceImage
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ReferenceImage.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.boundingPolys = [];
                            if (options.defaults) {
                                object.name = "";
                                object.uri = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.boundingPolys && message.boundingPolys.length) {
                                object.boundingPolys = [];
                                for (var j = 0; j < message.boundingPolys.length; ++j)
                                    object.boundingPolys[j] = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingPolys[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ReferenceImage to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ReferenceImage.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ReferenceImage
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ReferenceImage
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ReferenceImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ReferenceImage";
                        };
    
                        return ReferenceImage;
                    })();
    
                    v1.CreateProductRequest = (function() {
    
                        /**
                         * Properties of a CreateProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface ICreateProductRequest
                         * @property {string|null} [parent] CreateProductRequest parent
                         * @property {google.cloud.vision.v1.IProduct|null} [product] CreateProductRequest product
                         * @property {string|null} [productId] CreateProductRequest productId
                         */
    
                        /**
                         * Constructs a new CreateProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CreateProductRequest.
                         * @implements ICreateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.ICreateProductRequest=} [properties] Properties to set
                         */
                        function CreateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.parent = "";
    
                        /**
                         * CreateProductRequest product.
                         * @member {google.cloud.vision.v1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.product = null;
    
                        /**
                         * CreateProductRequest productId.
                         * @member {string} productId
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.productId = "";
    
                        /**
                         * Creates a new CreateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CreateProductRequest} CreateProductRequest instance
                         */
                        CreateProductRequest.create = function create(properties) {
                            return new CreateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message. Does not implicitly {@link google.cloud.vision.v1.CreateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1.Product.encode(message.product, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CreateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CreateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = $root.google.cloud.vision.v1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                if (!$util.isString(message.productId))
                                    return "productId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CreateProductRequest} CreateProductRequest
                         */
                        CreateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CreateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CreateProductRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1.CreateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1.Product.fromObject(object.product);
                            }
                            if (object.productId != null)
                                message.productId = String(object.productId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.CreateProductRequest} message CreateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.product = null;
                                object.productId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1.Product.toObject(message.product, options);
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                object.productId = message.productId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CreateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CreateProductRequest";
                        };
    
                        return CreateProductRequest;
                    })();
    
                    v1.ListProductsRequest = (function() {
    
                        /**
                         * Properties of a ListProductsRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductsRequest
                         * @property {string|null} [parent] ListProductsRequest parent
                         * @property {number|null} [pageSize] ListProductsRequest pageSize
                         * @property {string|null} [pageToken] ListProductsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductsRequest.
                         * @implements IListProductsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductsRequest=} [properties] Properties to set
                         */
                        function ListProductsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.parent = "";
    
                        /**
                         * ListProductsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductsRequest} ListProductsRequest instance
                         */
                        ListProductsRequest.create = function create(properties) {
                            return new ListProductsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message. Does not implicitly {@link google.cloud.vision.v1.ListProductsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductsRequest} ListProductsRequest
                         */
                        ListProductsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.ListProductsRequest} message ListProductsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductsRequest";
                        };
    
                        return ListProductsRequest;
                    })();
    
                    v1.ListProductsResponse = (function() {
    
                        /**
                         * Properties of a ListProductsResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductsResponse
                         * @property {Array.<google.cloud.vision.v1.IProduct>|null} [products] ListProductsResponse products
                         * @property {string|null} [nextPageToken] ListProductsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductsResponse.
                         * @implements IListProductsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductsResponse=} [properties] Properties to set
                         */
                        function ListProductsResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsResponse products.
                         * @member {Array.<google.cloud.vision.v1.IProduct>} products
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductsResponse} ListProductsResponse instance
                         */
                        ListProductsResponse.create = function create(properties) {
                            return new ListProductsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message. Does not implicitly {@link google.cloud.vision.v1.ListProductsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductsResponse} ListProductsResponse
                         */
                        ListProductsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductsResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1.ListProductsResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ListProductsResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1.ListProductsResponse} message ListProductsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductsResponse";
                        };
    
                        return ListProductsResponse;
                    })();
    
                    v1.GetProductRequest = (function() {
    
                        /**
                         * Properties of a GetProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IGetProductRequest
                         * @property {string|null} [name] GetProductRequest name
                         */
    
                        /**
                         * Constructs a new GetProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a GetProductRequest.
                         * @implements IGetProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IGetProductRequest=} [properties] Properties to set
                         */
                        function GetProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @instance
                         */
                        GetProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.GetProductRequest} GetProductRequest instance
                         */
                        GetProductRequest.create = function create(properties) {
                            return new GetProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message. Does not implicitly {@link google.cloud.vision.v1.GetProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.GetProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.GetProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.GetProductRequest} GetProductRequest
                         */
                        GetProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.GetProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.GetProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.GetProductRequest} message GetProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.GetProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.GetProductRequest";
                        };
    
                        return GetProductRequest;
                    })();
    
                    v1.UpdateProductRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IUpdateProductRequest
                         * @property {google.cloud.vision.v1.IProduct|null} [product] UpdateProductRequest product
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an UpdateProductRequest.
                         * @implements IUpdateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IUpdateProductRequest=} [properties] Properties to set
                         */
                        function UpdateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductRequest product.
                         * @member {google.cloud.vision.v1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.product = null;
    
                        /**
                         * UpdateProductRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.UpdateProductRequest} UpdateProductRequest instance
                         */
                        UpdateProductRequest.create = function create(properties) {
                            return new UpdateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message. Does not implicitly {@link google.cloud.vision.v1.UpdateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.UpdateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.UpdateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.product = $root.google.cloud.vision.v1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.UpdateProductRequest} UpdateProductRequest
                         */
                        UpdateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.UpdateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.UpdateProductRequest();
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1.UpdateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1.Product.fromObject(object.product);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1.UpdateProductRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.UpdateProductRequest} message UpdateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.product = null;
                                object.updateMask = null;
                            }
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1.Product.toObject(message.product, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.UpdateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.UpdateProductRequest";
                        };
    
                        return UpdateProductRequest;
                    })();
    
                    v1.DeleteProductRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IDeleteProductRequest
                         * @property {string|null} [name] DeleteProductRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a DeleteProductRequest.
                         * @implements IDeleteProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IDeleteProductRequest=} [properties] Properties to set
                         */
                        function DeleteProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @instance
                         */
                        DeleteProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.DeleteProductRequest} DeleteProductRequest instance
                         */
                        DeleteProductRequest.create = function create(properties) {
                            return new DeleteProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message. Does not implicitly {@link google.cloud.vision.v1.DeleteProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.DeleteProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.DeleteProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.DeleteProductRequest} DeleteProductRequest
                         */
                        DeleteProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.DeleteProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.DeleteProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1.DeleteProductRequest} message DeleteProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.DeleteProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.DeleteProductRequest";
                        };
    
                        return DeleteProductRequest;
                    })();
    
                    v1.CreateProductSetRequest = (function() {
    
                        /**
                         * Properties of a CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface ICreateProductSetRequest
                         * @property {string|null} [parent] CreateProductSetRequest parent
                         * @property {google.cloud.vision.v1.IProductSet|null} [productSet] CreateProductSetRequest productSet
                         * @property {string|null} [productSetId] CreateProductSetRequest productSetId
                         */
    
                        /**
                         * Constructs a new CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CreateProductSetRequest.
                         * @implements ICreateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest=} [properties] Properties to set
                         */
                        function CreateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductSetRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.parent = "";
    
                        /**
                         * CreateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * CreateProductSetRequest productSetId.
                         * @member {string} productSetId
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSetId = "";
    
                        /**
                         * Creates a new CreateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CreateProductSetRequest} CreateProductSetRequest instance
                         */
                        CreateProductSetRequest.create = function create(properties) {
                            return new CreateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.CreateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1.ProductSet.encode(message.productSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productSetId != null && Object.hasOwnProperty.call(message, "productSetId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productSetId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CreateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CreateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.productSet = $root.google.cloud.vision.v1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productSetId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                if (!$util.isString(message.productSetId))
                                    return "productSetId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CreateProductSetRequest} CreateProductSetRequest
                         */
                        CreateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CreateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CreateProductSetRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1.CreateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.productSetId != null)
                                message.productSetId = String(object.productSetId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.CreateProductSetRequest} message CreateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.productSet = null;
                                object.productSetId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1.ProductSet.toObject(message.productSet, options);
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                object.productSetId = message.productSetId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CreateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CreateProductSetRequest";
                        };
    
                        return CreateProductSetRequest;
                    })();
    
                    v1.ListProductSetsRequest = (function() {
    
                        /**
                         * Properties of a ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductSetsRequest
                         * @property {string|null} [parent] ListProductSetsRequest parent
                         * @property {number|null} [pageSize] ListProductSetsRequest pageSize
                         * @property {string|null} [pageToken] ListProductSetsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductSetsRequest.
                         * @implements IListProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductSetsRequest=} [properties] Properties to set
                         */
                        function ListProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ListProductSetsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductSetsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductSetsRequest} ListProductSetsRequest instance
                         */
                        ListProductSetsRequest.create = function create(properties) {
                            return new ListProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1.ListProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductSetsRequest} ListProductSetsRequest
                         */
                        ListProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.ListProductSetsRequest} message ListProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductSetsRequest";
                        };
    
                        return ListProductSetsRequest;
                    })();
    
                    v1.ListProductSetsResponse = (function() {
    
                        /**
                         * Properties of a ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1.IProductSet>|null} [productSets] ListProductSetsResponse productSets
                         * @property {string|null} [nextPageToken] ListProductSetsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductSetsResponse.
                         * @implements IListProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductSetsResponse=} [properties] Properties to set
                         */
                        function ListProductSetsResponse(properties) {
                            this.productSets = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsResponse productSets.
                         * @member {Array.<google.cloud.vision.v1.IProductSet>} productSets
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.productSets = $util.emptyArray;
    
                        /**
                         * ListProductSetsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductSetsResponse} ListProductSetsResponse instance
                         */
                        ListProductSetsResponse.create = function create(properties) {
                            return new ListProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1.ListProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSets != null && message.productSets.length)
                                for (var i = 0; i < message.productSets.length; ++i)
                                    $root.google.cloud.vision.v1.ProductSet.encode(message.productSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.productSets && message.productSets.length))
                                            message.productSets = [];
                                        message.productSets.push($root.google.cloud.vision.v1.ProductSet.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSets != null && message.hasOwnProperty("productSets")) {
                                if (!Array.isArray(message.productSets))
                                    return "productSets: array expected";
                                for (var i = 0; i < message.productSets.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ProductSet.verify(message.productSets[i]);
                                    if (error)
                                        return "productSets." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductSetsResponse} ListProductSetsResponse
                         */
                        ListProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductSetsResponse();
                            if (object.productSets) {
                                if (!Array.isArray(object.productSets))
                                    throw TypeError(".google.cloud.vision.v1.ListProductSetsResponse.productSets: array expected");
                                message.productSets = [];
                                for (var i = 0; i < object.productSets.length; ++i) {
                                    if (typeof object.productSets[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ListProductSetsResponse.productSets: object expected");
                                    message.productSets[i] = $root.google.cloud.vision.v1.ProductSet.fromObject(object.productSets[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.ListProductSetsResponse} message ListProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productSets = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.productSets && message.productSets.length) {
                                object.productSets = [];
                                for (var j = 0; j < message.productSets.length; ++j)
                                    object.productSets[j] = $root.google.cloud.vision.v1.ProductSet.toObject(message.productSets[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductSetsResponse";
                        };
    
                        return ListProductSetsResponse;
                    })();
    
                    v1.GetProductSetRequest = (function() {
    
                        /**
                         * Properties of a GetProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IGetProductSetRequest
                         * @property {string|null} [name] GetProductSetRequest name
                         */
    
                        /**
                         * Constructs a new GetProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a GetProductSetRequest.
                         * @implements IGetProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IGetProductSetRequest=} [properties] Properties to set
                         */
                        function GetProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @instance
                         */
                        GetProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.GetProductSetRequest} GetProductSetRequest instance
                         */
                        GetProductSetRequest.create = function create(properties) {
                            return new GetProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.GetProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.GetProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.GetProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.GetProductSetRequest} GetProductSetRequest
                         */
                        GetProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.GetProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.GetProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.GetProductSetRequest} message GetProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.GetProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.GetProductSetRequest";
                        };
    
                        return GetProductSetRequest;
                    })();
    
                    v1.UpdateProductSetRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IUpdateProductSetRequest
                         * @property {google.cloud.vision.v1.IProductSet|null} [productSet] UpdateProductSetRequest productSet
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductSetRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an UpdateProductSetRequest.
                         * @implements IUpdateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest=} [properties] Properties to set
                         */
                        function UpdateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * UpdateProductSetRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.UpdateProductSetRequest} UpdateProductSetRequest instance
                         */
                        UpdateProductSetRequest.create = function create(properties) {
                            return new UpdateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1.ProductSet.encode(message.productSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.UpdateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.productSet = $root.google.cloud.vision.v1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.UpdateProductSetRequest} UpdateProductSetRequest
                         */
                        UpdateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.UpdateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.UpdateProductSetRequest();
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1.UpdateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1.UpdateProductSetRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.UpdateProductSetRequest} message UpdateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.productSet = null;
                                object.updateMask = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1.ProductSet.toObject(message.productSet, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.UpdateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.UpdateProductSetRequest";
                        };
    
                        return UpdateProductSetRequest;
                    })();
    
                    v1.DeleteProductSetRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IDeleteProductSetRequest
                         * @property {string|null} [name] DeleteProductSetRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a DeleteProductSetRequest.
                         * @implements IDeleteProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest=} [properties] Properties to set
                         */
                        function DeleteProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @instance
                         */
                        DeleteProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.DeleteProductSetRequest} DeleteProductSetRequest instance
                         */
                        DeleteProductSetRequest.create = function create(properties) {
                            return new DeleteProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.DeleteProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.DeleteProductSetRequest} DeleteProductSetRequest
                         */
                        DeleteProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.DeleteProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.DeleteProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.DeleteProductSetRequest} message DeleteProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.DeleteProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.DeleteProductSetRequest";
                        };
    
                        return DeleteProductSetRequest;
                    })();
    
                    v1.CreateReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface ICreateReferenceImageRequest
                         * @property {string|null} [parent] CreateReferenceImageRequest parent
                         * @property {google.cloud.vision.v1.IReferenceImage|null} [referenceImage] CreateReferenceImageRequest referenceImage
                         * @property {string|null} [referenceImageId] CreateReferenceImageRequest referenceImageId
                         */
    
                        /**
                         * Constructs a new CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a CreateReferenceImageRequest.
                         * @implements ICreateReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest=} [properties] Properties to set
                         */
                        function CreateReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateReferenceImageRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.parent = "";
    
                        /**
                         * CreateReferenceImageRequest referenceImage.
                         * @member {google.cloud.vision.v1.IReferenceImage|null|undefined} referenceImage
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImage = null;
    
                        /**
                         * CreateReferenceImageRequest referenceImageId.
                         * @member {string} referenceImageId
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImageId = "";
    
                        /**
                         * Creates a new CreateReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.CreateReferenceImageRequest} CreateReferenceImageRequest instance
                         */
                        CreateReferenceImageRequest.create = function create(properties) {
                            return new CreateReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.referenceImage != null && Object.hasOwnProperty.call(message, "referenceImage"))
                                $root.google.cloud.vision.v1.ReferenceImage.encode(message.referenceImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.referenceImageId != null && Object.hasOwnProperty.call(message, "referenceImageId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.referenceImageId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.CreateReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.referenceImage = $root.google.cloud.vision.v1.ReferenceImage.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.referenceImageId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage")) {
                                var error = $root.google.cloud.vision.v1.ReferenceImage.verify(message.referenceImage);
                                if (error)
                                    return "referenceImage." + error;
                            }
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                if (!$util.isString(message.referenceImageId))
                                    return "referenceImageId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         */
                        CreateReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.CreateReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.CreateReferenceImageRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.referenceImage != null) {
                                if (typeof object.referenceImage !== "object")
                                    throw TypeError(".google.cloud.vision.v1.CreateReferenceImageRequest.referenceImage: object expected");
                                message.referenceImage = $root.google.cloud.vision.v1.ReferenceImage.fromObject(object.referenceImage);
                            }
                            if (object.referenceImageId != null)
                                message.referenceImageId = String(object.referenceImageId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.CreateReferenceImageRequest} message CreateReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.referenceImage = null;
                                object.referenceImageId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage"))
                                object.referenceImage = $root.google.cloud.vision.v1.ReferenceImage.toObject(message.referenceImage, options);
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                object.referenceImageId = message.referenceImageId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.CreateReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.CreateReferenceImageRequest";
                        };
    
                        return CreateReferenceImageRequest;
                    })();
    
                    v1.ListReferenceImagesRequest = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IListReferenceImagesRequest
                         * @property {string|null} [parent] ListReferenceImagesRequest parent
                         * @property {number|null} [pageSize] ListReferenceImagesRequest pageSize
                         * @property {string|null} [pageToken] ListReferenceImagesRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListReferenceImagesRequest.
                         * @implements IListReferenceImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest=} [properties] Properties to set
                         */
                        function ListReferenceImagesRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.parent = "";
    
                        /**
                         * ListReferenceImagesRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListReferenceImagesRequest} ListReferenceImagesRequest instance
                         */
                        ListReferenceImagesRequest.create = function create(properties) {
                            return new ListReferenceImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message. Does not implicitly {@link google.cloud.vision.v1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListReferenceImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         */
                        ListReferenceImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListReferenceImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListReferenceImagesRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1.ListReferenceImagesRequest} message ListReferenceImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListReferenceImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListReferenceImagesRequest";
                        };
    
                        return ListReferenceImagesRequest;
                    })();
    
                    v1.ListReferenceImagesResponse = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IListReferenceImagesResponse
                         * @property {Array.<google.cloud.vision.v1.IReferenceImage>|null} [referenceImages] ListReferenceImagesResponse referenceImages
                         * @property {number|null} [pageSize] ListReferenceImagesResponse pageSize
                         * @property {string|null} [nextPageToken] ListReferenceImagesResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListReferenceImagesResponse.
                         * @implements IListReferenceImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IListReferenceImagesResponse=} [properties] Properties to set
                         */
                        function ListReferenceImagesResponse(properties) {
                            this.referenceImages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ListReferenceImagesResponse pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListReferenceImagesResponse} ListReferenceImagesResponse instance
                         */
                        ListReferenceImagesResponse.create = function create(properties) {
                            return new ListReferenceImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message. Does not implicitly {@link google.cloud.vision.v1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListReferenceImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         */
                        ListReferenceImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListReferenceImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListReferenceImagesResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1.ListReferenceImagesResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ListReferenceImagesResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1.ListReferenceImagesResponse} message ListReferenceImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.referenceImages = [];
                            if (options.defaults) {
                                object.pageSize = 0;
                                object.nextPageToken = "";
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListReferenceImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListReferenceImagesResponse";
                        };
    
                        return ListReferenceImagesResponse;
                    })();
    
                    v1.GetReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IGetReferenceImageRequest
                         * @property {string|null} [name] GetReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a GetReferenceImageRequest.
                         * @implements IGetReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest=} [properties] Properties to set
                         */
                        function GetReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @instance
                         */
                        GetReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.GetReferenceImageRequest} GetReferenceImageRequest instance
                         */
                        GetReferenceImageRequest.create = function create(properties) {
                            return new GetReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.GetReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.GetReferenceImageRequest} GetReferenceImageRequest
                         */
                        GetReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.GetReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.GetReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.GetReferenceImageRequest} message GetReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.GetReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.GetReferenceImageRequest";
                        };
    
                        return GetReferenceImageRequest;
                    })();
    
                    v1.DeleteReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IDeleteReferenceImageRequest
                         * @property {string|null} [name] DeleteReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a DeleteReferenceImageRequest.
                         * @implements IDeleteReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         */
                        function DeleteReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @instance
                         */
                        DeleteReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.DeleteReferenceImageRequest} DeleteReferenceImageRequest instance
                         */
                        DeleteReferenceImageRequest.create = function create(properties) {
                            return new DeleteReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.DeleteReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         */
                        DeleteReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.DeleteReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.DeleteReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1.DeleteReferenceImageRequest} message DeleteReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.DeleteReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.DeleteReferenceImageRequest";
                        };
    
                        return DeleteReferenceImageRequest;
                    })();
    
                    v1.AddProductToProductSetRequest = (function() {
    
                        /**
                         * Properties of an AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IAddProductToProductSetRequest
                         * @property {string|null} [name] AddProductToProductSetRequest name
                         * @property {string|null} [product] AddProductToProductSetRequest product
                         */
    
                        /**
                         * Constructs a new AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an AddProductToProductSetRequest.
                         * @implements IAddProductToProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest=} [properties] Properties to set
                         */
                        function AddProductToProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AddProductToProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.name = "";
    
                        /**
                         * AddProductToProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new AddProductToProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.AddProductToProductSetRequest} AddProductToProductSetRequest instance
                         */
                        AddProductToProductSetRequest.create = function create(properties) {
                            return new AddProductToProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.AddProductToProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AddProductToProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AddProductToProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an AddProductToProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         */
                        AddProductToProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.AddProductToProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.AddProductToProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AddProductToProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.AddProductToProductSetRequest} message AddProductToProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AddProductToProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this AddProductToProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AddProductToProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AddProductToProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.AddProductToProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AddProductToProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.AddProductToProductSetRequest";
                        };
    
                        return AddProductToProductSetRequest;
                    })();
    
                    v1.RemoveProductFromProductSetRequest = (function() {
    
                        /**
                         * Properties of a RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IRemoveProductFromProductSetRequest
                         * @property {string|null} [name] RemoveProductFromProductSetRequest name
                         * @property {string|null} [product] RemoveProductFromProductSetRequest product
                         */
    
                        /**
                         * Constructs a new RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a RemoveProductFromProductSetRequest.
                         * @implements IRemoveProductFromProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         */
                        function RemoveProductFromProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * RemoveProductFromProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.name = "";
    
                        /**
                         * RemoveProductFromProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new RemoveProductFromProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest instance
                         */
                        RemoveProductFromProductSetRequest.create = function create(properties) {
                            return new RemoveProductFromProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.RemoveProductFromProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a RemoveProductFromProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        RemoveProductFromProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a RemoveProductFromProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         */
                        RemoveProductFromProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.RemoveProductFromProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.RemoveProductFromProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a RemoveProductFromProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.RemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        RemoveProductFromProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this RemoveProductFromProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        RemoveProductFromProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for RemoveProductFromProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        RemoveProductFromProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.RemoveProductFromProductSetRequest";
                        };
    
                        return RemoveProductFromProductSetRequest;
                    })();
    
                    v1.ListProductsInProductSetRequest = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductsInProductSetRequest
                         * @property {string|null} [name] ListProductsInProductSetRequest name
                         * @property {number|null} [pageSize] ListProductsInProductSetRequest pageSize
                         * @property {string|null} [pageToken] ListProductsInProductSetRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductsInProductSetRequest.
                         * @implements IListProductsInProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest=} [properties] Properties to set
                         */
                        function ListProductsInProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.name = "";
    
                        /**
                         * ListProductsInProductSetRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsInProductSetRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetRequest} ListProductsInProductSetRequest instance
                         */
                        ListProductsInProductSetRequest.create = function create(properties) {
                            return new ListProductsInProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductsInProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         */
                        ListProductsInProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductsInProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductsInProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1.ListProductsInProductSetRequest} message ListProductsInProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductsInProductSetRequest";
                        };
    
                        return ListProductsInProductSetRequest;
                    })();
    
                    v1.ListProductsInProductSetResponse = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IListProductsInProductSetResponse
                         * @property {Array.<google.cloud.vision.v1.IProduct>|null} [products] ListProductsInProductSetResponse products
                         * @property {string|null} [nextPageToken] ListProductsInProductSetResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ListProductsInProductSetResponse.
                         * @implements IListProductsInProductSetResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IListProductsInProductSetResponse=} [properties] Properties to set
                         */
                        function ListProductsInProductSetResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetResponse products.
                         * @member {Array.<google.cloud.vision.v1.IProduct>} products
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsInProductSetResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetResponse} ListProductsInProductSetResponse instance
                         */
                        ListProductsInProductSetResponse.create = function create(properties) {
                            return new ListProductsInProductSetResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message. Does not implicitly {@link google.cloud.vision.v1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ListProductsInProductSetResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         */
                        ListProductsInProductSetResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ListProductsInProductSetResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ListProductsInProductSetResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1.ListProductsInProductSetResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ListProductsInProductSetResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1.ListProductsInProductSetResponse} message ListProductsInProductSetResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ListProductsInProductSetResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ListProductsInProductSetResponse";
                        };
    
                        return ListProductsInProductSetResponse;
                    })();
    
                    v1.ImportProductSetsGcsSource = (function() {
    
                        /**
                         * Properties of an ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1
                         * @interface IImportProductSetsGcsSource
                         * @property {string|null} [csvFileUri] ImportProductSetsGcsSource csvFileUri
                         */
    
                        /**
                         * Constructs a new ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImportProductSetsGcsSource.
                         * @implements IImportProductSetsGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1.IImportProductSetsGcsSource=} [properties] Properties to set
                         */
                        function ImportProductSetsGcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsGcsSource csvFileUri.
                         * @member {string} csvFileUri
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @instance
                         */
                        ImportProductSetsGcsSource.prototype.csvFileUri = "";
    
                        /**
                         * Creates a new ImportProductSetsGcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImportProductSetsGcsSource} ImportProductSetsGcsSource instance
                         */
                        ImportProductSetsGcsSource.create = function create(properties) {
                            return new ImportProductSetsGcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.csvFileUri != null && Object.hasOwnProperty.call(message, "csvFileUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.csvFileUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImportProductSetsGcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.csvFileUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsGcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsGcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                if (!$util.isString(message.csvFileUri))
                                    return "csvFileUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsGcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         */
                        ImportProductSetsGcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImportProductSetsGcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImportProductSetsGcsSource();
                            if (object.csvFileUri != null)
                                message.csvFileUri = String(object.csvFileUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsGcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1.ImportProductSetsGcsSource} message ImportProductSetsGcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsGcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.csvFileUri = "";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                object.csvFileUri = message.csvFileUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsGcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsGcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsGcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImportProductSetsGcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImportProductSetsGcsSource";
                        };
    
                        return ImportProductSetsGcsSource;
                    })();
    
                    v1.ImportProductSetsInputConfig = (function() {
    
                        /**
                         * Properties of an ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1
                         * @interface IImportProductSetsInputConfig
                         * @property {google.cloud.vision.v1.IImportProductSetsGcsSource|null} [gcsSource] ImportProductSetsInputConfig gcsSource
                         */
    
                        /**
                         * Constructs a new ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImportProductSetsInputConfig.
                         * @implements IImportProductSetsInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1.IImportProductSetsInputConfig=} [properties] Properties to set
                         */
                        function ImportProductSetsInputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsInputConfig gcsSource.
                         * @member {google.cloud.vision.v1.IImportProductSetsGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @instance
                         */
                        ImportProductSetsInputConfig.prototype.gcsSource = null;
    
                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;
    
                        /**
                         * ImportProductSetsInputConfig source.
                         * @member {"gcsSource"|undefined} source
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @instance
                         */
                        Object.defineProperty(ImportProductSetsInputConfig.prototype, "source", {
                            get: $util.oneOfGetter($oneOfFields = ["gcsSource"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });
    
                        /**
                         * Creates a new ImportProductSetsInputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImportProductSetsInputConfig} ImportProductSetsInputConfig instance
                         */
                        ImportProductSetsInputConfig.create = function create(properties) {
                            return new ImportProductSetsInputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1.ImportProductSetsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImportProductSetsInputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1.ImportProductSetsGcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsInputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsInputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                properties.source = 1;
                                {
                                    var error = $root.google.cloud.vision.v1.ImportProductSetsGcsSource.verify(message.gcsSource);
                                    if (error)
                                        return "gcsSource." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsInputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         */
                        ImportProductSetsInputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImportProductSetsInputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImportProductSetsInputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImportProductSetsInputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1.ImportProductSetsGcsSource.fromObject(object.gcsSource);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsInputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1.ImportProductSetsInputConfig} message ImportProductSetsInputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsInputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                object.gcsSource = $root.google.cloud.vision.v1.ImportProductSetsGcsSource.toObject(message.gcsSource, options);
                                if (options.oneofs)
                                    object.source = "gcsSource";
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsInputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsInputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsInputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImportProductSetsInputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsInputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImportProductSetsInputConfig";
                        };
    
                        return ImportProductSetsInputConfig;
                    })();
    
                    v1.ImportProductSetsRequest = (function() {
    
                        /**
                         * Properties of an ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IImportProductSetsRequest
                         * @property {string|null} [parent] ImportProductSetsRequest parent
                         * @property {google.cloud.vision.v1.IImportProductSetsInputConfig|null} [inputConfig] ImportProductSetsRequest inputConfig
                         */
    
                        /**
                         * Constructs a new ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImportProductSetsRequest.
                         * @implements IImportProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest=} [properties] Properties to set
                         */
                        function ImportProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ImportProductSetsRequest inputConfig.
                         * @member {google.cloud.vision.v1.IImportProductSetsInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.inputConfig = null;
    
                        /**
                         * Creates a new ImportProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImportProductSetsRequest} ImportProductSetsRequest instance
                         */
                        ImportProductSetsRequest.create = function create(properties) {
                            return new ImportProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1.ImportProductSetsInputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImportProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.inputConfig = $root.google.cloud.vision.v1.ImportProductSetsInputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1.ImportProductSetsInputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImportProductSetsRequest} ImportProductSetsRequest
                         */
                        ImportProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImportProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImportProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.ImportProductSetsRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1.ImportProductSetsInputConfig.fromObject(object.inputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1.ImportProductSetsRequest} message ImportProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.inputConfig = null;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1.ImportProductSetsInputConfig.toObject(message.inputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImportProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImportProductSetsRequest";
                        };
    
                        return ImportProductSetsRequest;
                    })();
    
                    v1.ImportProductSetsResponse = (function() {
    
                        /**
                         * Properties of an ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1
                         * @interface IImportProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1.IReferenceImage>|null} [referenceImages] ImportProductSetsResponse referenceImages
                         * @property {Array.<google.rpc.IStatus>|null} [statuses] ImportProductSetsResponse statuses
                         */
    
                        /**
                         * Constructs a new ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents an ImportProductSetsResponse.
                         * @implements IImportProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1.IImportProductSetsResponse=} [properties] Properties to set
                         */
                        function ImportProductSetsResponse(properties) {
                            this.referenceImages = [];
                            this.statuses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ImportProductSetsResponse statuses.
                         * @member {Array.<google.rpc.IStatus>} statuses
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.statuses = $util.emptyArray;
    
                        /**
                         * Creates a new ImportProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ImportProductSetsResponse} ImportProductSetsResponse instance
                         */
                        ImportProductSetsResponse.create = function create(properties) {
                            return new ImportProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.statuses != null && message.statuses.length)
                                for (var i = 0; i < message.statuses.length; ++i)
                                    $root.google.rpc.Status.encode(message.statuses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ImportProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.statuses && message.statuses.length))
                                            message.statuses = [];
                                        message.statuses.push($root.google.rpc.Status.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.statuses != null && message.hasOwnProperty("statuses")) {
                                if (!Array.isArray(message.statuses))
                                    return "statuses: array expected";
                                for (var i = 0; i < message.statuses.length; ++i) {
                                    var error = $root.google.rpc.Status.verify(message.statuses[i]);
                                    if (error)
                                        return "statuses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ImportProductSetsResponse} ImportProductSetsResponse
                         */
                        ImportProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ImportProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ImportProductSetsResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1.ImportProductSetsResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ImportProductSetsResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.statuses) {
                                if (!Array.isArray(object.statuses))
                                    throw TypeError(".google.cloud.vision.v1.ImportProductSetsResponse.statuses: array expected");
                                message.statuses = [];
                                for (var i = 0; i < object.statuses.length; ++i) {
                                    if (typeof object.statuses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.ImportProductSetsResponse.statuses: object expected");
                                    message.statuses[i] = $root.google.rpc.Status.fromObject(object.statuses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1.ImportProductSetsResponse} message ImportProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.referenceImages = [];
                                object.statuses = [];
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.statuses && message.statuses.length) {
                                object.statuses = [];
                                for (var j = 0; j < message.statuses.length; ++j)
                                    object.statuses[j] = $root.google.rpc.Status.toObject(message.statuses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ImportProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ImportProductSetsResponse";
                        };
    
                        return ImportProductSetsResponse;
                    })();
    
                    v1.BatchOperationMetadata = (function() {
    
                        /**
                         * Properties of a BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1
                         * @interface IBatchOperationMetadata
                         * @property {google.cloud.vision.v1.BatchOperationMetadata.State|null} [state] BatchOperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [submitTime] BatchOperationMetadata submitTime
                         * @property {google.protobuf.ITimestamp|null} [endTime] BatchOperationMetadata endTime
                         */
    
                        /**
                         * Constructs a new BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a BatchOperationMetadata.
                         * @implements IBatchOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1.IBatchOperationMetadata=} [properties] Properties to set
                         */
                        function BatchOperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchOperationMetadata state.
                         * @member {google.cloud.vision.v1.BatchOperationMetadata.State} state
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.state = 0;
    
                        /**
                         * BatchOperationMetadata submitTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} submitTime
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.submitTime = null;
    
                        /**
                         * BatchOperationMetadata endTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} endTime
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.endTime = null;
    
                        /**
                         * Creates a new BatchOperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IBatchOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.BatchOperationMetadata} BatchOperationMetadata instance
                         */
                        BatchOperationMetadata.create = function create(properties) {
                            return new BatchOperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message. Does not implicitly {@link google.cloud.vision.v1.BatchOperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime"))
                                $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
                                $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1.BatchOperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.BatchOperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchOperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchOperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.submitTime != null && message.hasOwnProperty("submitTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.submitTime);
                                if (error)
                                    return "submitTime." + error;
                            }
                            if (message.endTime != null && message.hasOwnProperty("endTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.endTime);
                                if (error)
                                    return "endTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchOperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.BatchOperationMetadata} BatchOperationMetadata
                         */
                        BatchOperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.BatchOperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1.BatchOperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "PROCESSING":
                            case 1:
                                message.state = 1;
                                break;
                            case "SUCCESSFUL":
                            case 2:
                                message.state = 2;
                                break;
                            case "FAILED":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.submitTime != null) {
                                if (typeof object.submitTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.BatchOperationMetadata.submitTime: object expected");
                                message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime);
                            }
                            if (object.endTime != null) {
                                if (typeof object.endTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1.BatchOperationMetadata.endTime: object expected");
                                message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchOperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1.BatchOperationMetadata} message BatchOperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchOperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.submitTime = null;
                                object.endTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1.BatchOperationMetadata.State[message.state] : message.state;
                            if (message.submitTime != null && message.hasOwnProperty("submitTime"))
                                object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options);
                            if (message.endTime != null && message.hasOwnProperty("endTime"))
                                object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this BatchOperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchOperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchOperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.BatchOperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.BatchOperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1.BatchOperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} PROCESSING=1 PROCESSING value
                         * @property {number} SUCCESSFUL=2 SUCCESSFUL value
                         * @property {number} FAILED=3 FAILED value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        BatchOperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "PROCESSING"] = 1;
                            values[valuesById[2] = "SUCCESSFUL"] = 2;
                            values[valuesById[3] = "FAILED"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return BatchOperationMetadata;
                    })();
    
                    v1.ProductSetPurgeConfig = (function() {
    
                        /**
                         * Properties of a ProductSetPurgeConfig.
                         * @memberof google.cloud.vision.v1
                         * @interface IProductSetPurgeConfig
                         * @property {string|null} [productSetId] ProductSetPurgeConfig productSetId
                         */
    
                        /**
                         * Constructs a new ProductSetPurgeConfig.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a ProductSetPurgeConfig.
                         * @implements IProductSetPurgeConfig
                         * @constructor
                         * @param {google.cloud.vision.v1.IProductSetPurgeConfig=} [properties] Properties to set
                         */
                        function ProductSetPurgeConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSetPurgeConfig productSetId.
                         * @member {string} productSetId
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @instance
                         */
                        ProductSetPurgeConfig.prototype.productSetId = "";
    
                        /**
                         * Creates a new ProductSetPurgeConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1.IProductSetPurgeConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.ProductSetPurgeConfig} ProductSetPurgeConfig instance
                         */
                        ProductSetPurgeConfig.create = function create(properties) {
                            return new ProductSetPurgeConfig(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSetPurgeConfig message. Does not implicitly {@link google.cloud.vision.v1.ProductSetPurgeConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1.IProductSetPurgeConfig} message ProductSetPurgeConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSetPurgeConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSetId != null && Object.hasOwnProperty.call(message, "productSetId"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.productSetId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSetPurgeConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1.ProductSetPurgeConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1.IProductSetPurgeConfig} message ProductSetPurgeConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSetPurgeConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSetPurgeConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSetPurgeConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.ProductSetPurgeConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.productSetId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSetPurgeConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSetPurgeConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSetPurgeConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSetPurgeConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                if (!$util.isString(message.productSetId))
                                    return "productSetId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ProductSetPurgeConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         */
                        ProductSetPurgeConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.ProductSetPurgeConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1.ProductSetPurgeConfig();
                            if (object.productSetId != null)
                                message.productSetId = String(object.productSetId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSetPurgeConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1.ProductSetPurgeConfig} message ProductSetPurgeConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSetPurgeConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.productSetId = "";
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                object.productSetId = message.productSetId;
                            return object;
                        };
    
                        /**
                         * Converts this ProductSetPurgeConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSetPurgeConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSetPurgeConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.ProductSetPurgeConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSetPurgeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.ProductSetPurgeConfig";
                        };
    
                        return ProductSetPurgeConfig;
                    })();
    
                    v1.PurgeProductsRequest = (function() {
    
                        /**
                         * Properties of a PurgeProductsRequest.
                         * @memberof google.cloud.vision.v1
                         * @interface IPurgeProductsRequest
                         * @property {google.cloud.vision.v1.IProductSetPurgeConfig|null} [productSetPurgeConfig] PurgeProductsRequest productSetPurgeConfig
                         * @property {boolean|null} [deleteOrphanProducts] PurgeProductsRequest deleteOrphanProducts
                         * @property {string|null} [parent] PurgeProductsRequest parent
                         * @property {boolean|null} [force] PurgeProductsRequest force
                         */
    
                        /**
                         * Constructs a new PurgeProductsRequest.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a PurgeProductsRequest.
                         * @implements IPurgeProductsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest=} [properties] Properties to set
                         */
                        function PurgeProductsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * PurgeProductsRequest productSetPurgeConfig.
                         * @member {google.cloud.vision.v1.IProductSetPurgeConfig|null|undefined} productSetPurgeConfig
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.productSetPurgeConfig = null;
    
                        /**
                         * PurgeProductsRequest deleteOrphanProducts.
                         * @member {boolean|null|undefined} deleteOrphanProducts
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.deleteOrphanProducts = null;
    
                        /**
                         * PurgeProductsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.parent = "";
    
                        /**
                         * PurgeProductsRequest force.
                         * @member {boolean} force
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.force = false;
    
                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;
    
                        /**
                         * PurgeProductsRequest target.
                         * @member {"productSetPurgeConfig"|"deleteOrphanProducts"|undefined} target
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         */
                        Object.defineProperty(PurgeProductsRequest.prototype, "target", {
                            get: $util.oneOfGetter($oneOfFields = ["productSetPurgeConfig", "deleteOrphanProducts"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });
    
                        /**
                         * Creates a new PurgeProductsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.PurgeProductsRequest} PurgeProductsRequest instance
                         */
                        PurgeProductsRequest.create = function create(properties) {
                            return new PurgeProductsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified PurgeProductsRequest message. Does not implicitly {@link google.cloud.vision.v1.PurgeProductsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest} message PurgeProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PurgeProductsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.productSetPurgeConfig != null && Object.hasOwnProperty.call(message, "productSetPurgeConfig"))
                                $root.google.cloud.vision.v1.ProductSetPurgeConfig.encode(message.productSetPurgeConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.deleteOrphanProducts != null && Object.hasOwnProperty.call(message, "deleteOrphanProducts"))
                                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleteOrphanProducts);
                            if (message.force != null && Object.hasOwnProperty.call(message, "force"))
                                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified PurgeProductsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1.PurgeProductsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.IPurgeProductsRequest} message PurgeProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PurgeProductsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a PurgeProductsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.PurgeProductsRequest} PurgeProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PurgeProductsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.PurgeProductsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.productSetPurgeConfig = $root.google.cloud.vision.v1.ProductSetPurgeConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.deleteOrphanProducts = reader.bool();
                                        break;
                                    }
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.force = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a PurgeProductsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.PurgeProductsRequest} PurgeProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PurgeProductsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a PurgeProductsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        PurgeProductsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.productSetPurgeConfig != null && message.hasOwnProperty("productSetPurgeConfig")) {
                                properties.target = 1;
                                {
                                    var error = $root.google.cloud.vision.v1.ProductSetPurgeConfig.verify(message.productSetPurgeConfig);
                                    if (error)
                                        return "productSetPurgeConfig." + error;
                                }
                            }
                            if (message.deleteOrphanProducts != null && message.hasOwnProperty("deleteOrphanProducts")) {
                                if (properties.target === 1)
                                    return "target: multiple values";
                                properties.target = 1;
                                if (typeof message.deleteOrphanProducts !== "boolean")
                                    return "deleteOrphanProducts: boolean expected";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.force != null && message.hasOwnProperty("force"))
                                if (typeof message.force !== "boolean")
                                    return "force: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a PurgeProductsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.PurgeProductsRequest} PurgeProductsRequest
                         */
                        PurgeProductsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.PurgeProductsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1.PurgeProductsRequest();
                            if (object.productSetPurgeConfig != null) {
                                if (typeof object.productSetPurgeConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1.PurgeProductsRequest.productSetPurgeConfig: object expected");
                                message.productSetPurgeConfig = $root.google.cloud.vision.v1.ProductSetPurgeConfig.fromObject(object.productSetPurgeConfig);
                            }
                            if (object.deleteOrphanProducts != null)
                                message.deleteOrphanProducts = Boolean(object.deleteOrphanProducts);
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.force != null)
                                message.force = Boolean(object.force);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a PurgeProductsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1.PurgeProductsRequest} message PurgeProductsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        PurgeProductsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.force = false;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.productSetPurgeConfig != null && message.hasOwnProperty("productSetPurgeConfig")) {
                                object.productSetPurgeConfig = $root.google.cloud.vision.v1.ProductSetPurgeConfig.toObject(message.productSetPurgeConfig, options);
                                if (options.oneofs)
                                    object.target = "productSetPurgeConfig";
                            }
                            if (message.deleteOrphanProducts != null && message.hasOwnProperty("deleteOrphanProducts")) {
                                object.deleteOrphanProducts = message.deleteOrphanProducts;
                                if (options.oneofs)
                                    object.target = "deleteOrphanProducts";
                            }
                            if (message.force != null && message.hasOwnProperty("force"))
                                object.force = message.force;
                            return object;
                        };
    
                        /**
                         * Converts this PurgeProductsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        PurgeProductsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for PurgeProductsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.PurgeProductsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        PurgeProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.PurgeProductsRequest";
                        };
    
                        return PurgeProductsRequest;
                    })();
    
                    v1.TextAnnotation = (function() {
    
                        /**
                         * Properties of a TextAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @interface ITextAnnotation
                         * @property {Array.<google.cloud.vision.v1.IPage>|null} [pages] TextAnnotation pages
                         * @property {string|null} [text] TextAnnotation text
                         */
    
                        /**
                         * Constructs a new TextAnnotation.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a TextAnnotation.
                         * @implements ITextAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1.ITextAnnotation=} [properties] Properties to set
                         */
                        function TextAnnotation(properties) {
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextAnnotation pages.
                         * @member {Array.<google.cloud.vision.v1.IPage>} pages
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.pages = $util.emptyArray;
    
                        /**
                         * TextAnnotation text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.text = "";
    
                        /**
                         * Creates a new TextAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ITextAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.TextAnnotation} TextAnnotation instance
                         */
                        TextAnnotation.create = function create(properties) {
                            return new TextAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.pages != null && message.pages.length)
                                for (var i = 0; i < message.pages.length; ++i)
                                    $root.google.cloud.vision.v1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.TextAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        message.pages.push($root.google.cloud.vision.v1.Page.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.text = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Page.verify(message.pages[i]);
                                    if (error)
                                        return "pages." + error;
                                }
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a TextAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.TextAnnotation} TextAnnotation
                         */
                        TextAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.TextAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1.TextAnnotation();
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1.TextAnnotation.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i) {
                                    if (typeof object.pages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.TextAnnotation.pages: object expected");
                                    message.pages[i] = $root.google.cloud.vision.v1.Page.fromObject(object.pages[i]);
                                }
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1.TextAnnotation} message TextAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.pages = [];
                            if (options.defaults)
                                object.text = "";
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = $root.google.cloud.vision.v1.Page.toObject(message.pages[j], options);
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            return object;
                        };
    
                        /**
                         * Converts this TextAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.TextAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.TextAnnotation";
                        };
    
                        TextAnnotation.DetectedLanguage = (function() {
    
                            /**
                             * Properties of a DetectedLanguage.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @interface IDetectedLanguage
                             * @property {string|null} [languageCode] DetectedLanguage languageCode
                             * @property {number|null} [confidence] DetectedLanguage confidence
                             */
    
                            /**
                             * Constructs a new DetectedLanguage.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @classdesc Represents a DetectedLanguage.
                             * @implements IDetectedLanguage
                             * @constructor
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             */
                            function DetectedLanguage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedLanguage languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.languageCode = "";
    
                            /**
                             * DetectedLanguage confidence.
                             * @member {number} confidence
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.confidence = 0;
    
                            /**
                             * Creates a new DetectedLanguage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedLanguage} DetectedLanguage instance
                             */
                            DetectedLanguage.create = function create(properties) {
                                return new DetectedLanguage(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
                                if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.confidence = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedLanguage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedLanguage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    if (typeof message.confidence !== "number")
                                        return "confidence: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             */
                            DetectedLanguage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage();
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.confidence != null)
                                    message.confidence = Number(object.confidence);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.DetectedLanguage} message DetectedLanguage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedLanguage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.languageCode = "";
                                    object.confidence = 0;
                                }
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedLanguage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedLanguage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedLanguage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.TextAnnotation.DetectedLanguage";
                            };
    
                            return DetectedLanguage;
                        })();
    
                        TextAnnotation.DetectedBreak = (function() {
    
                            /**
                             * Properties of a DetectedBreak.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @interface IDetectedBreak
                             * @property {google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType|null} [type] DetectedBreak type
                             * @property {boolean|null} [isPrefix] DetectedBreak isPrefix
                             */
    
                            /**
                             * Constructs a new DetectedBreak.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @classdesc Represents a DetectedBreak.
                             * @implements IDetectedBreak
                             * @constructor
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             */
                            function DetectedBreak(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedBreak type.
                             * @member {google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType} type
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.type = 0;
    
                            /**
                             * DetectedBreak isPrefix.
                             * @member {boolean} isPrefix
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.isPrefix = false;
    
                            /**
                             * Creates a new DetectedBreak instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedBreak} DetectedBreak instance
                             */
                            DetectedBreak.create = function create(properties) {
                                return new DetectedBreak(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                                if (message.isPrefix != null && Object.hasOwnProperty.call(message, "isPrefix"))
                                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isPrefix);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 2: {
                                            message.isPrefix = reader.bool();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedBreak message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedBreak.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                        break;
                                    }
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    if (typeof message.isPrefix !== "boolean")
                                        return "isPrefix: boolean expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.TextAnnotation.DetectedBreak} DetectedBreak
                             */
                            DetectedBreak.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "SPACE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "SURE_SPACE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "EOL_SURE_SPACE":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "HYPHEN":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LINE_BREAK":
                                case 5:
                                    message.type = 5;
                                    break;
                                }
                                if (object.isPrefix != null)
                                    message.isPrefix = Boolean(object.isPrefix);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.DetectedBreak} message DetectedBreak
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedBreak.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN" : 0;
                                    object.isPrefix = false;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type;
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    object.isPrefix = message.isPrefix;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedBreak to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedBreak.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedBreak
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.TextAnnotation.DetectedBreak";
                            };
    
                            /**
                             * BreakType enum.
                             * @name google.cloud.vision.v1.TextAnnotation.DetectedBreak.BreakType
                             * @enum {number}
                             * @property {number} UNKNOWN=0 UNKNOWN value
                             * @property {number} SPACE=1 SPACE value
                             * @property {number} SURE_SPACE=2 SURE_SPACE value
                             * @property {number} EOL_SURE_SPACE=3 EOL_SURE_SPACE value
                             * @property {number} HYPHEN=4 HYPHEN value
                             * @property {number} LINE_BREAK=5 LINE_BREAK value
                             */
                            DetectedBreak.BreakType = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN"] = 0;
                                values[valuesById[1] = "SPACE"] = 1;
                                values[valuesById[2] = "SURE_SPACE"] = 2;
                                values[valuesById[3] = "EOL_SURE_SPACE"] = 3;
                                values[valuesById[4] = "HYPHEN"] = 4;
                                values[valuesById[5] = "LINE_BREAK"] = 5;
                                return values;
                            })();
    
                            return DetectedBreak;
                        })();
    
                        TextAnnotation.TextProperty = (function() {
    
                            /**
                             * Properties of a TextProperty.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @interface ITextProperty
                             * @property {Array.<google.cloud.vision.v1.TextAnnotation.IDetectedLanguage>|null} [detectedLanguages] TextProperty detectedLanguages
                             * @property {google.cloud.vision.v1.TextAnnotation.IDetectedBreak|null} [detectedBreak] TextProperty detectedBreak
                             */
    
                            /**
                             * Constructs a new TextProperty.
                             * @memberof google.cloud.vision.v1.TextAnnotation
                             * @classdesc Represents a TextProperty.
                             * @implements ITextProperty
                             * @constructor
                             * @param {google.cloud.vision.v1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             */
                            function TextProperty(properties) {
                                this.detectedLanguages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * TextProperty detectedLanguages.
                             * @member {Array.<google.cloud.vision.v1.TextAnnotation.IDetectedLanguage>} detectedLanguages
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedLanguages = $util.emptyArray;
    
                            /**
                             * TextProperty detectedBreak.
                             * @member {google.cloud.vision.v1.TextAnnotation.IDetectedBreak|null|undefined} detectedBreak
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedBreak = null;
    
                            /**
                             * Creates a new TextProperty instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.TextAnnotation.TextProperty} TextProperty instance
                             */
                            TextProperty.create = function create(properties) {
                                return new TextProperty(properties);
                            };
    
                            /**
                             * Encodes the specified TextProperty message. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.detectedLanguages != null && message.detectedLanguages.length)
                                    for (var i = 0; i < message.detectedLanguages.length; ++i)
                                        $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
                                    $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified TextProperty message, length delimited. Does not implicitly {@link google.cloud.vision.v1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.TextAnnotation.TextProperty();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            if (!(message.detectedLanguages && message.detectedLanguages.length))
                                                message.detectedLanguages = [];
                                            message.detectedLanguages.push($root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 2: {
                                            message.detectedBreak = $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a TextProperty message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            TextProperty.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
                                    if (!Array.isArray(message.detectedLanguages))
                                        return "detectedLanguages: array expected";
                                    for (var i = 0; i < message.detectedLanguages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.verify(message.detectedLanguages[i]);
                                        if (error)
                                            return "detectedLanguages." + error;
                                    }
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
                                    var error = $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.verify(message.detectedBreak);
                                    if (error)
                                        return "detectedBreak." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a TextProperty message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.TextAnnotation.TextProperty} TextProperty
                             */
                            TextProperty.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.TextAnnotation.TextProperty)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.TextAnnotation.TextProperty();
                                if (object.detectedLanguages) {
                                    if (!Array.isArray(object.detectedLanguages))
                                        throw TypeError(".google.cloud.vision.v1.TextAnnotation.TextProperty.detectedLanguages: array expected");
                                    message.detectedLanguages = [];
                                    for (var i = 0; i < object.detectedLanguages.length; ++i) {
                                        if (typeof object.detectedLanguages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1.TextAnnotation.TextProperty.detectedLanguages: object expected");
                                        message.detectedLanguages[i] = $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.fromObject(object.detectedLanguages[i]);
                                    }
                                }
                                if (object.detectedBreak != null) {
                                    if (typeof object.detectedBreak !== "object")
                                        throw TypeError(".google.cloud.vision.v1.TextAnnotation.TextProperty.detectedBreak: object expected");
                                    message.detectedBreak = $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.fromObject(object.detectedBreak);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a TextProperty message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1.TextAnnotation.TextProperty} message TextProperty
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            TextProperty.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults)
                                    object.detectedLanguages = [];
                                if (options.defaults)
                                    object.detectedBreak = null;
                                if (message.detectedLanguages && message.detectedLanguages.length) {
                                    object.detectedLanguages = [];
                                    for (var j = 0; j < message.detectedLanguages.length; ++j)
                                        object.detectedLanguages[j] = $root.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.toObject(message.detectedLanguages[j], options);
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
                                    object.detectedBreak = $root.google.cloud.vision.v1.TextAnnotation.DetectedBreak.toObject(message.detectedBreak, options);
                                return object;
                            };
    
                            /**
                             * Converts this TextProperty to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            TextProperty.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for TextProperty
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.TextAnnotation.TextProperty
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            TextProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.TextAnnotation.TextProperty";
                            };
    
                            return TextProperty;
                        })();
    
                        return TextAnnotation;
                    })();
    
                    v1.Page = (function() {
    
                        /**
                         * Properties of a Page.
                         * @memberof google.cloud.vision.v1
                         * @interface IPage
                         * @property {google.cloud.vision.v1.TextAnnotation.ITextProperty|null} [property] Page property
                         * @property {number|null} [width] Page width
                         * @property {number|null} [height] Page height
                         * @property {Array.<google.cloud.vision.v1.IBlock>|null} [blocks] Page blocks
                         * @property {number|null} [confidence] Page confidence
                         */
    
                        /**
                         * Constructs a new Page.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Page.
                         * @implements IPage
                         * @constructor
                         * @param {google.cloud.vision.v1.IPage=} [properties] Properties to set
                         */
                        function Page(properties) {
                            this.blocks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Page property.
                         * @member {google.cloud.vision.v1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         */
                        Page.prototype.property = null;
    
                        /**
                         * Page width.
                         * @member {number} width
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         */
                        Page.prototype.width = 0;
    
                        /**
                         * Page height.
                         * @member {number} height
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         */
                        Page.prototype.height = 0;
    
                        /**
                         * Page blocks.
                         * @member {Array.<google.cloud.vision.v1.IBlock>} blocks
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         */
                        Page.prototype.blocks = $util.emptyArray;
    
                        /**
                         * Page confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         */
                        Page.prototype.confidence = 0;
    
                        /**
                         * Creates a new Page instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {google.cloud.vision.v1.IPage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Page} Page instance
                         */
                        Page.create = function create(properties) {
                            return new Page(properties);
                        };
    
                        /**
                         * Encodes the specified Page message. Does not implicitly {@link google.cloud.vision.v1.Page.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {google.cloud.vision.v1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.width);
                            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height);
                            if (message.blocks != null && message.blocks.length)
                                for (var i = 0; i < message.blocks.length; ++i)
                                    $root.google.cloud.vision.v1.Block.encode(message.blocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Page.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {google.cloud.vision.v1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Page();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.width = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.height = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        if (!(message.blocks && message.blocks.length))
                                            message.blocks = [];
                                        message.blocks.push($root.google.cloud.vision.v1.Block.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Page message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Page.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.width != null && message.hasOwnProperty("width"))
                                if (!$util.isInteger(message.width))
                                    return "width: integer expected";
                            if (message.height != null && message.hasOwnProperty("height"))
                                if (!$util.isInteger(message.height))
                                    return "height: integer expected";
                            if (message.blocks != null && message.hasOwnProperty("blocks")) {
                                if (!Array.isArray(message.blocks))
                                    return "blocks: array expected";
                                for (var i = 0; i < message.blocks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Block.verify(message.blocks[i]);
                                    if (error)
                                        return "blocks." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Page message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Page} Page
                         */
                        Page.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Page)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Page();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Page.property: object expected");
                                message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.width != null)
                                message.width = object.width | 0;
                            if (object.height != null)
                                message.height = object.height | 0;
                            if (object.blocks) {
                                if (!Array.isArray(object.blocks))
                                    throw TypeError(".google.cloud.vision.v1.Page.blocks: array expected");
                                message.blocks = [];
                                for (var i = 0; i < object.blocks.length; ++i) {
                                    if (typeof object.blocks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.Page.blocks: object expected");
                                    message.blocks[i] = $root.google.cloud.vision.v1.Block.fromObject(object.blocks[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Page message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {google.cloud.vision.v1.Page} message Page
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Page.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.blocks = [];
                            if (options.defaults) {
                                object.property = null;
                                object.width = 0;
                                object.height = 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.width != null && message.hasOwnProperty("width"))
                                object.width = message.width;
                            if (message.height != null && message.hasOwnProperty("height"))
                                object.height = message.height;
                            if (message.blocks && message.blocks.length) {
                                object.blocks = [];
                                for (var j = 0; j < message.blocks.length; ++j)
                                    object.blocks[j] = $root.google.cloud.vision.v1.Block.toObject(message.blocks[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Page to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Page
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Page.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Page
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Page
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Page";
                        };
    
                        return Page;
                    })();
    
                    v1.Block = (function() {
    
                        /**
                         * Properties of a Block.
                         * @memberof google.cloud.vision.v1
                         * @interface IBlock
                         * @property {google.cloud.vision.v1.TextAnnotation.ITextProperty|null} [property] Block property
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingBox] Block boundingBox
                         * @property {Array.<google.cloud.vision.v1.IParagraph>|null} [paragraphs] Block paragraphs
                         * @property {google.cloud.vision.v1.Block.BlockType|null} [blockType] Block blockType
                         * @property {number|null} [confidence] Block confidence
                         */
    
                        /**
                         * Constructs a new Block.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Block.
                         * @implements IBlock
                         * @constructor
                         * @param {google.cloud.vision.v1.IBlock=} [properties] Properties to set
                         */
                        function Block(properties) {
                            this.paragraphs = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Block property.
                         * @member {google.cloud.vision.v1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         */
                        Block.prototype.property = null;
    
                        /**
                         * Block boundingBox.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         */
                        Block.prototype.boundingBox = null;
    
                        /**
                         * Block paragraphs.
                         * @member {Array.<google.cloud.vision.v1.IParagraph>} paragraphs
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         */
                        Block.prototype.paragraphs = $util.emptyArray;
    
                        /**
                         * Block blockType.
                         * @member {google.cloud.vision.v1.Block.BlockType} blockType
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         */
                        Block.prototype.blockType = 0;
    
                        /**
                         * Block confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         */
                        Block.prototype.confidence = 0;
    
                        /**
                         * Creates a new Block instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {google.cloud.vision.v1.IBlock=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Block} Block instance
                         */
                        Block.create = function create(properties) {
                            return new Block(properties);
                        };
    
                        /**
                         * Encodes the specified Block message. Does not implicitly {@link google.cloud.vision.v1.Block.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {google.cloud.vision.v1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.paragraphs != null && message.paragraphs.length)
                                for (var i = 0; i < message.paragraphs.length; ++i)
                                    $root.google.cloud.vision.v1.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.blockType != null && Object.hasOwnProperty.call(message, "blockType"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.blockType);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Block.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {google.cloud.vision.v1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Block();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.paragraphs && message.paragraphs.length))
                                            message.paragraphs = [];
                                        message.paragraphs.push($root.google.cloud.vision.v1.Paragraph.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.blockType = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Block message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Block.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
                                if (!Array.isArray(message.paragraphs))
                                    return "paragraphs: array expected";
                                for (var i = 0; i < message.paragraphs.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Paragraph.verify(message.paragraphs[i]);
                                    if (error)
                                        return "paragraphs." + error;
                                }
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                switch (message.blockType) {
                                default:
                                    return "blockType: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Block message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Block} Block
                         */
                        Block.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Block)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Block();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Block.property: object expected");
                                message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Block.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.paragraphs) {
                                if (!Array.isArray(object.paragraphs))
                                    throw TypeError(".google.cloud.vision.v1.Block.paragraphs: array expected");
                                message.paragraphs = [];
                                for (var i = 0; i < object.paragraphs.length; ++i) {
                                    if (typeof object.paragraphs[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.Block.paragraphs: object expected");
                                    message.paragraphs[i] = $root.google.cloud.vision.v1.Paragraph.fromObject(object.paragraphs[i]);
                                }
                            }
                            switch (object.blockType) {
                            default:
                                if (typeof object.blockType === "number") {
                                    message.blockType = object.blockType;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blockType = 0;
                                break;
                            case "TEXT":
                            case 1:
                                message.blockType = 1;
                                break;
                            case "TABLE":
                            case 2:
                                message.blockType = 2;
                                break;
                            case "PICTURE":
                            case 3:
                                message.blockType = 3;
                                break;
                            case "RULER":
                            case 4:
                                message.blockType = 4;
                                break;
                            case "BARCODE":
                            case 5:
                                message.blockType = 5;
                                break;
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Block message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {google.cloud.vision.v1.Block} message Block
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Block.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.paragraphs = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.blockType = options.enums === String ? "UNKNOWN" : 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.paragraphs && message.paragraphs.length) {
                                object.paragraphs = [];
                                for (var j = 0; j < message.paragraphs.length; ++j)
                                    object.paragraphs[j] = $root.google.cloud.vision.v1.Paragraph.toObject(message.paragraphs[j], options);
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                object.blockType = options.enums === String ? $root.google.cloud.vision.v1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1.Block.BlockType[message.blockType] : message.blockType;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Block to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Block
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Block.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Block
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Block
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Block";
                        };
    
                        /**
                         * BlockType enum.
                         * @name google.cloud.vision.v1.Block.BlockType
                         * @enum {number}
                         * @property {number} UNKNOWN=0 UNKNOWN value
                         * @property {number} TEXT=1 TEXT value
                         * @property {number} TABLE=2 TABLE value
                         * @property {number} PICTURE=3 PICTURE value
                         * @property {number} RULER=4 RULER value
                         * @property {number} BARCODE=5 BARCODE value
                         */
                        Block.BlockType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNKNOWN"] = 0;
                            values[valuesById[1] = "TEXT"] = 1;
                            values[valuesById[2] = "TABLE"] = 2;
                            values[valuesById[3] = "PICTURE"] = 3;
                            values[valuesById[4] = "RULER"] = 4;
                            values[valuesById[5] = "BARCODE"] = 5;
                            return values;
                        })();
    
                        return Block;
                    })();
    
                    v1.Paragraph = (function() {
    
                        /**
                         * Properties of a Paragraph.
                         * @memberof google.cloud.vision.v1
                         * @interface IParagraph
                         * @property {google.cloud.vision.v1.TextAnnotation.ITextProperty|null} [property] Paragraph property
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingBox] Paragraph boundingBox
                         * @property {Array.<google.cloud.vision.v1.IWord>|null} [words] Paragraph words
                         * @property {number|null} [confidence] Paragraph confidence
                         */
    
                        /**
                         * Constructs a new Paragraph.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Paragraph.
                         * @implements IParagraph
                         * @constructor
                         * @param {google.cloud.vision.v1.IParagraph=} [properties] Properties to set
                         */
                        function Paragraph(properties) {
                            this.words = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Paragraph property.
                         * @member {google.cloud.vision.v1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.property = null;
    
                        /**
                         * Paragraph boundingBox.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.boundingBox = null;
    
                        /**
                         * Paragraph words.
                         * @member {Array.<google.cloud.vision.v1.IWord>} words
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.words = $util.emptyArray;
    
                        /**
                         * Paragraph confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.confidence = 0;
    
                        /**
                         * Creates a new Paragraph instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1.IParagraph=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Paragraph} Paragraph instance
                         */
                        Paragraph.create = function create(properties) {
                            return new Paragraph(properties);
                        };
    
                        /**
                         * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.vision.v1.Paragraph.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.words != null && message.words.length)
                                for (var i = 0; i < message.words.length; ++i)
                                    $root.google.cloud.vision.v1.Word.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Paragraph.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Paragraph();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.words && message.words.length))
                                            message.words = [];
                                        message.words.push($root.google.cloud.vision.v1.Word.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Paragraph message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Paragraph.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.words != null && message.hasOwnProperty("words")) {
                                if (!Array.isArray(message.words))
                                    return "words: array expected";
                                for (var i = 0; i < message.words.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Word.verify(message.words[i]);
                                    if (error)
                                        return "words." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Paragraph} Paragraph
                         */
                        Paragraph.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Paragraph)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Paragraph();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Paragraph.property: object expected");
                                message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Paragraph.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.words) {
                                if (!Array.isArray(object.words))
                                    throw TypeError(".google.cloud.vision.v1.Paragraph.words: array expected");
                                message.words = [];
                                for (var i = 0; i < object.words.length; ++i) {
                                    if (typeof object.words[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.Paragraph.words: object expected");
                                    message.words[i] = $root.google.cloud.vision.v1.Word.fromObject(object.words[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1.Paragraph} message Paragraph
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Paragraph.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.words = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.words && message.words.length) {
                                object.words = [];
                                for (var j = 0; j < message.words.length; ++j)
                                    object.words[j] = $root.google.cloud.vision.v1.Word.toObject(message.words[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Paragraph to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Paragraph.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Paragraph
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Paragraph
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Paragraph";
                        };
    
                        return Paragraph;
                    })();
    
                    v1.Word = (function() {
    
                        /**
                         * Properties of a Word.
                         * @memberof google.cloud.vision.v1
                         * @interface IWord
                         * @property {google.cloud.vision.v1.TextAnnotation.ITextProperty|null} [property] Word property
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingBox] Word boundingBox
                         * @property {Array.<google.cloud.vision.v1.ISymbol>|null} [symbols] Word symbols
                         * @property {number|null} [confidence] Word confidence
                         */
    
                        /**
                         * Constructs a new Word.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Word.
                         * @implements IWord
                         * @constructor
                         * @param {google.cloud.vision.v1.IWord=} [properties] Properties to set
                         */
                        function Word(properties) {
                            this.symbols = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Word property.
                         * @member {google.cloud.vision.v1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1.Word
                         * @instance
                         */
                        Word.prototype.property = null;
    
                        /**
                         * Word boundingBox.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1.Word
                         * @instance
                         */
                        Word.prototype.boundingBox = null;
    
                        /**
                         * Word symbols.
                         * @member {Array.<google.cloud.vision.v1.ISymbol>} symbols
                         * @memberof google.cloud.vision.v1.Word
                         * @instance
                         */
                        Word.prototype.symbols = $util.emptyArray;
    
                        /**
                         * Word confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.Word
                         * @instance
                         */
                        Word.prototype.confidence = 0;
    
                        /**
                         * Creates a new Word instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {google.cloud.vision.v1.IWord=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Word} Word instance
                         */
                        Word.create = function create(properties) {
                            return new Word(properties);
                        };
    
                        /**
                         * Encodes the specified Word message. Does not implicitly {@link google.cloud.vision.v1.Word.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {google.cloud.vision.v1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.symbols != null && message.symbols.length)
                                for (var i = 0; i < message.symbols.length; ++i)
                                    $root.google.cloud.vision.v1.Symbol.encode(message.symbols[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Word message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Word.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {google.cloud.vision.v1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Word();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.symbols && message.symbols.length))
                                            message.symbols = [];
                                        message.symbols.push($root.google.cloud.vision.v1.Symbol.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Word message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Word.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.symbols != null && message.hasOwnProperty("symbols")) {
                                if (!Array.isArray(message.symbols))
                                    return "symbols: array expected";
                                for (var i = 0; i < message.symbols.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.Symbol.verify(message.symbols[i]);
                                    if (error)
                                        return "symbols." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Word message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Word} Word
                         */
                        Word.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Word)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Word();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Word.property: object expected");
                                message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Word.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.symbols) {
                                if (!Array.isArray(object.symbols))
                                    throw TypeError(".google.cloud.vision.v1.Word.symbols: array expected");
                                message.symbols = [];
                                for (var i = 0; i < object.symbols.length; ++i) {
                                    if (typeof object.symbols[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.Word.symbols: object expected");
                                    message.symbols[i] = $root.google.cloud.vision.v1.Symbol.fromObject(object.symbols[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Word message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {google.cloud.vision.v1.Word} message Word
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Word.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.symbols = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.symbols && message.symbols.length) {
                                object.symbols = [];
                                for (var j = 0; j < message.symbols.length; ++j)
                                    object.symbols[j] = $root.google.cloud.vision.v1.Symbol.toObject(message.symbols[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Word to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Word
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Word.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Word
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Word
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Word.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Word";
                        };
    
                        return Word;
                    })();
    
                    v1.Symbol = (function() {
    
                        /**
                         * Properties of a Symbol.
                         * @memberof google.cloud.vision.v1
                         * @interface ISymbol
                         * @property {google.cloud.vision.v1.TextAnnotation.ITextProperty|null} [property] Symbol property
                         * @property {google.cloud.vision.v1.IBoundingPoly|null} [boundingBox] Symbol boundingBox
                         * @property {string|null} [text] Symbol text
                         * @property {number|null} [confidence] Symbol confidence
                         */
    
                        /**
                         * Constructs a new Symbol.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a Symbol.
                         * @implements ISymbol
                         * @constructor
                         * @param {google.cloud.vision.v1.ISymbol=} [properties] Properties to set
                         */
                        function Symbol(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Symbol property.
                         * @member {google.cloud.vision.v1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1.Symbol
                         * @instance
                         */
                        Symbol.prototype.property = null;
    
                        /**
                         * Symbol boundingBox.
                         * @member {google.cloud.vision.v1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1.Symbol
                         * @instance
                         */
                        Symbol.prototype.boundingBox = null;
    
                        /**
                         * Symbol text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1.Symbol
                         * @instance
                         */
                        Symbol.prototype.text = "";
    
                        /**
                         * Symbol confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1.Symbol
                         * @instance
                         */
                        Symbol.prototype.confidence = 0;
    
                        /**
                         * Creates a new Symbol instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1.ISymbol=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.Symbol} Symbol instance
                         */
                        Symbol.create = function create(properties) {
                            return new Symbol(properties);
                        };
    
                        /**
                         * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.vision.v1.Symbol.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.vision.v1.Symbol.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.Symbol();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.text = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Symbol message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Symbol.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.Symbol} Symbol
                         */
                        Symbol.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.Symbol)
                                return object;
                            var message = new $root.google.cloud.vision.v1.Symbol();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Symbol.property: object expected");
                                message.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1.Symbol.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Symbol message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1.Symbol} message Symbol
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Symbol.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.text = "";
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Symbol to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.Symbol
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Symbol.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Symbol
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.Symbol
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.Symbol";
                        };
    
                        return Symbol;
                    })();
    
                    v1.WebDetection = (function() {
    
                        /**
                         * Properties of a WebDetection.
                         * @memberof google.cloud.vision.v1
                         * @interface IWebDetection
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebEntity>|null} [webEntities] WebDetection webEntities
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebImage>|null} [fullMatchingImages] WebDetection fullMatchingImages
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebImage>|null} [partialMatchingImages] WebDetection partialMatchingImages
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebPage>|null} [pagesWithMatchingImages] WebDetection pagesWithMatchingImages
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebImage>|null} [visuallySimilarImages] WebDetection visuallySimilarImages
                         * @property {Array.<google.cloud.vision.v1.WebDetection.IWebLabel>|null} [bestGuessLabels] WebDetection bestGuessLabels
                         */
    
                        /**
                         * Constructs a new WebDetection.
                         * @memberof google.cloud.vision.v1
                         * @classdesc Represents a WebDetection.
                         * @implements IWebDetection
                         * @constructor
                         * @param {google.cloud.vision.v1.IWebDetection=} [properties] Properties to set
                         */
                        function WebDetection(properties) {
                            this.webEntities = [];
                            this.fullMatchingImages = [];
                            this.partialMatchingImages = [];
                            this.pagesWithMatchingImages = [];
                            this.visuallySimilarImages = [];
                            this.bestGuessLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetection webEntities.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebEntity>} webEntities
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.webEntities = $util.emptyArray;
    
                        /**
                         * WebDetection fullMatchingImages.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebImage>} fullMatchingImages
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.fullMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection partialMatchingImages.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebImage>} partialMatchingImages
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.partialMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection pagesWithMatchingImages.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebPage>} pagesWithMatchingImages
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.pagesWithMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection visuallySimilarImages.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebImage>} visuallySimilarImages
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.visuallySimilarImages = $util.emptyArray;
    
                        /**
                         * WebDetection bestGuessLabels.
                         * @member {Array.<google.cloud.vision.v1.WebDetection.IWebLabel>} bestGuessLabels
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.bestGuessLabels = $util.emptyArray;
    
                        /**
                         * Creates a new WebDetection instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetection=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1.WebDetection} WebDetection instance
                         */
                        WebDetection.create = function create(properties) {
                            return new WebDetection(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetection message. Does not implicitly {@link google.cloud.vision.v1.WebDetection.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.webEntities != null && message.webEntities.length)
                                for (var i = 0; i < message.webEntities.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebEntity.encode(message.webEntities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pagesWithMatchingImages != null && message.pagesWithMatchingImages.length)
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebPage.encode(message.pagesWithMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.visuallySimilarImages != null && message.visuallySimilarImages.length)
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebImage.encode(message.visuallySimilarImages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.bestGuessLabels != null && message.bestGuessLabels.length)
                                for (var i = 0; i < message.bestGuessLabels.length; ++i)
                                    $root.google.cloud.vision.v1.WebDetection.WebLabel.encode(message.bestGuessLabels[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetection message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetection.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetection();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.webEntities && message.webEntities.length))
                                            message.webEntities = [];
                                        message.webEntities.push($root.google.cloud.vision.v1.WebDetection.WebEntity.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                            message.fullMatchingImages = [];
                                        message.fullMatchingImages.push($root.google.cloud.vision.v1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                            message.partialMatchingImages = [];
                                        message.partialMatchingImages.push($root.google.cloud.vision.v1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pagesWithMatchingImages && message.pagesWithMatchingImages.length))
                                            message.pagesWithMatchingImages = [];
                                        message.pagesWithMatchingImages.push($root.google.cloud.vision.v1.WebDetection.WebPage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.visuallySimilarImages && message.visuallySimilarImages.length))
                                            message.visuallySimilarImages = [];
                                        message.visuallySimilarImages.push($root.google.cloud.vision.v1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 8: {
                                        if (!(message.bestGuessLabels && message.bestGuessLabels.length))
                                            message.bestGuessLabels = [];
                                        message.bestGuessLabels.push($root.google.cloud.vision.v1.WebDetection.WebLabel.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetection message.
                         * @function verify
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetection.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.webEntities != null && message.hasOwnProperty("webEntities")) {
                                if (!Array.isArray(message.webEntities))
                                    return "webEntities: array expected";
                                for (var i = 0; i < message.webEntities.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebEntity.verify(message.webEntities[i]);
                                    if (error)
                                        return "webEntities." + error;
                                }
                            }
                            if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                if (!Array.isArray(message.fullMatchingImages))
                                    return "fullMatchingImages: array expected";
                                for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                    if (error)
                                        return "fullMatchingImages." + error;
                                }
                            }
                            if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                if (!Array.isArray(message.partialMatchingImages))
                                    return "partialMatchingImages: array expected";
                                for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                    if (error)
                                        return "partialMatchingImages." + error;
                                }
                            }
                            if (message.pagesWithMatchingImages != null && message.hasOwnProperty("pagesWithMatchingImages")) {
                                if (!Array.isArray(message.pagesWithMatchingImages))
                                    return "pagesWithMatchingImages: array expected";
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebPage.verify(message.pagesWithMatchingImages[i]);
                                    if (error)
                                        return "pagesWithMatchingImages." + error;
                                }
                            }
                            if (message.visuallySimilarImages != null && message.hasOwnProperty("visuallySimilarImages")) {
                                if (!Array.isArray(message.visuallySimilarImages))
                                    return "visuallySimilarImages: array expected";
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebImage.verify(message.visuallySimilarImages[i]);
                                    if (error)
                                        return "visuallySimilarImages." + error;
                                }
                            }
                            if (message.bestGuessLabels != null && message.hasOwnProperty("bestGuessLabels")) {
                                if (!Array.isArray(message.bestGuessLabels))
                                    return "bestGuessLabels: array expected";
                                for (var i = 0; i < message.bestGuessLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1.WebDetection.WebLabel.verify(message.bestGuessLabels[i]);
                                    if (error)
                                        return "bestGuessLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a WebDetection message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1.WebDetection} WebDetection
                         */
                        WebDetection.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1.WebDetection)
                                return object;
                            var message = new $root.google.cloud.vision.v1.WebDetection();
                            if (object.webEntities) {
                                if (!Array.isArray(object.webEntities))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.webEntities: array expected");
                                message.webEntities = [];
                                for (var i = 0; i < object.webEntities.length; ++i) {
                                    if (typeof object.webEntities[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.webEntities: object expected");
                                    message.webEntities[i] = $root.google.cloud.vision.v1.WebDetection.WebEntity.fromObject(object.webEntities[i]);
                                }
                            }
                            if (object.fullMatchingImages) {
                                if (!Array.isArray(object.fullMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.fullMatchingImages: array expected");
                                message.fullMatchingImages = [];
                                for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                    if (typeof object.fullMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.fullMatchingImages: object expected");
                                    message.fullMatchingImages[i] = $root.google.cloud.vision.v1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                }
                            }
                            if (object.partialMatchingImages) {
                                if (!Array.isArray(object.partialMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.partialMatchingImages: array expected");
                                message.partialMatchingImages = [];
                                for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                    if (typeof object.partialMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.partialMatchingImages: object expected");
                                    message.partialMatchingImages[i] = $root.google.cloud.vision.v1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                }
                            }
                            if (object.pagesWithMatchingImages) {
                                if (!Array.isArray(object.pagesWithMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.pagesWithMatchingImages: array expected");
                                message.pagesWithMatchingImages = [];
                                for (var i = 0; i < object.pagesWithMatchingImages.length; ++i) {
                                    if (typeof object.pagesWithMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.pagesWithMatchingImages: object expected");
                                    message.pagesWithMatchingImages[i] = $root.google.cloud.vision.v1.WebDetection.WebPage.fromObject(object.pagesWithMatchingImages[i]);
                                }
                            }
                            if (object.visuallySimilarImages) {
                                if (!Array.isArray(object.visuallySimilarImages))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.visuallySimilarImages: array expected");
                                message.visuallySimilarImages = [];
                                for (var i = 0; i < object.visuallySimilarImages.length; ++i) {
                                    if (typeof object.visuallySimilarImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.visuallySimilarImages: object expected");
                                    message.visuallySimilarImages[i] = $root.google.cloud.vision.v1.WebDetection.WebImage.fromObject(object.visuallySimilarImages[i]);
                                }
                            }
                            if (object.bestGuessLabels) {
                                if (!Array.isArray(object.bestGuessLabels))
                                    throw TypeError(".google.cloud.vision.v1.WebDetection.bestGuessLabels: array expected");
                                message.bestGuessLabels = [];
                                for (var i = 0; i < object.bestGuessLabels.length; ++i) {
                                    if (typeof object.bestGuessLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.bestGuessLabels: object expected");
                                    message.bestGuessLabels[i] = $root.google.cloud.vision.v1.WebDetection.WebLabel.fromObject(object.bestGuessLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetection message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1.WebDetection} message WebDetection
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetection.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.webEntities = [];
                                object.fullMatchingImages = [];
                                object.partialMatchingImages = [];
                                object.pagesWithMatchingImages = [];
                                object.visuallySimilarImages = [];
                                object.bestGuessLabels = [];
                            }
                            if (message.webEntities && message.webEntities.length) {
                                object.webEntities = [];
                                for (var j = 0; j < message.webEntities.length; ++j)
                                    object.webEntities[j] = $root.google.cloud.vision.v1.WebDetection.WebEntity.toObject(message.webEntities[j], options);
                            }
                            if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                object.fullMatchingImages = [];
                                for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                    object.fullMatchingImages[j] = $root.google.cloud.vision.v1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                            }
                            if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                object.partialMatchingImages = [];
                                for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                    object.partialMatchingImages[j] = $root.google.cloud.vision.v1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                            }
                            if (message.pagesWithMatchingImages && message.pagesWithMatchingImages.length) {
                                object.pagesWithMatchingImages = [];
                                for (var j = 0; j < message.pagesWithMatchingImages.length; ++j)
                                    object.pagesWithMatchingImages[j] = $root.google.cloud.vision.v1.WebDetection.WebPage.toObject(message.pagesWithMatchingImages[j], options);
                            }
                            if (message.visuallySimilarImages && message.visuallySimilarImages.length) {
                                object.visuallySimilarImages = [];
                                for (var j = 0; j < message.visuallySimilarImages.length; ++j)
                                    object.visuallySimilarImages[j] = $root.google.cloud.vision.v1.WebDetection.WebImage.toObject(message.visuallySimilarImages[j], options);
                            }
                            if (message.bestGuessLabels && message.bestGuessLabels.length) {
                                object.bestGuessLabels = [];
                                for (var j = 0; j < message.bestGuessLabels.length; ++j)
                                    object.bestGuessLabels[j] = $root.google.cloud.vision.v1.WebDetection.WebLabel.toObject(message.bestGuessLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this WebDetection to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetection.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetection
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1.WebDetection
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1.WebDetection";
                        };
    
                        WebDetection.WebEntity = (function() {
    
                            /**
                             * Properties of a WebEntity.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @interface IWebEntity
                             * @property {string|null} [entityId] WebEntity entityId
                             * @property {number|null} [score] WebEntity score
                             * @property {string|null} [description] WebEntity description
                             */
    
                            /**
                             * Constructs a new WebEntity.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @classdesc Represents a WebEntity.
                             * @implements IWebEntity
                             * @constructor
                             * @param {google.cloud.vision.v1.WebDetection.IWebEntity=} [properties] Properties to set
                             */
                            function WebEntity(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebEntity entityId.
                             * @member {string} entityId
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.entityId = "";
    
                            /**
                             * WebEntity score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.score = 0;
    
                            /**
                             * WebEntity description.
                             * @member {string} description
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.description = "";
    
                            /**
                             * Creates a new WebEntity instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebEntity=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.WebDetection.WebEntity} WebEntity instance
                             */
                            WebEntity.create = function create(properties) {
                                return new WebEntity(properties);
                            };
    
                            /**
                             * Encodes the specified WebEntity message. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityId);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebEntity message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetection.WebEntity();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.entityId = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.description = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebEntity message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebEntity.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    if (!$util.isString(message.entityId))
                                        return "entityId: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.description != null && message.hasOwnProperty("description"))
                                    if (!$util.isString(message.description))
                                        return "description: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebEntity message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.WebDetection.WebEntity} WebEntity
                             */
                            WebEntity.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.WebDetection.WebEntity)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.WebDetection.WebEntity();
                                if (object.entityId != null)
                                    message.entityId = String(object.entityId);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.description != null)
                                    message.description = String(object.description);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebEntity message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.WebEntity} message WebEntity
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebEntity.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.entityId = "";
                                    object.score = 0;
                                    object.description = "";
                                }
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    object.entityId = message.entityId;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.description != null && message.hasOwnProperty("description"))
                                    object.description = message.description;
                                return object;
                            };
    
                            /**
                             * Converts this WebEntity to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebEntity.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebEntity
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.WebDetection.WebEntity
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.WebDetection.WebEntity";
                            };
    
                            return WebEntity;
                        })();
    
                        WebDetection.WebImage = (function() {
    
                            /**
                             * Properties of a WebImage.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @interface IWebImage
                             * @property {string|null} [url] WebImage url
                             * @property {number|null} [score] WebImage score
                             */
    
                            /**
                             * Constructs a new WebImage.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @classdesc Represents a WebImage.
                             * @implements IWebImage
                             * @constructor
                             * @param {google.cloud.vision.v1.WebDetection.IWebImage=} [properties] Properties to set
                             */
                            function WebImage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebImage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.url = "";
    
                            /**
                             * WebImage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.score = 0;
    
                            /**
                             * Creates a new WebImage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebImage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.WebDetection.WebImage} WebImage instance
                             */
                            WebImage.create = function create(properties) {
                                return new WebImage(properties);
                            };
    
                            /**
                             * Encodes the specified WebImage message. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebImage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebImage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetection.WebImage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebImage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebImage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebImage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.WebDetection.WebImage} WebImage
                             */
                            WebImage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.WebDetection.WebImage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.WebDetection.WebImage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebImage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.WebImage} message WebImage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebImage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this WebImage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebImage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebImage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.WebDetection.WebImage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.WebDetection.WebImage";
                            };
    
                            return WebImage;
                        })();
    
                        WebDetection.WebPage = (function() {
    
                            /**
                             * Properties of a WebPage.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @interface IWebPage
                             * @property {string|null} [url] WebPage url
                             * @property {number|null} [score] WebPage score
                             * @property {string|null} [pageTitle] WebPage pageTitle
                             * @property {Array.<google.cloud.vision.v1.WebDetection.IWebImage>|null} [fullMatchingImages] WebPage fullMatchingImages
                             * @property {Array.<google.cloud.vision.v1.WebDetection.IWebImage>|null} [partialMatchingImages] WebPage partialMatchingImages
                             */
    
                            /**
                             * Constructs a new WebPage.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @classdesc Represents a WebPage.
                             * @implements IWebPage
                             * @constructor
                             * @param {google.cloud.vision.v1.WebDetection.IWebPage=} [properties] Properties to set
                             */
                            function WebPage(properties) {
                                this.fullMatchingImages = [];
                                this.partialMatchingImages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebPage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.url = "";
    
                            /**
                             * WebPage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.score = 0;
    
                            /**
                             * WebPage pageTitle.
                             * @member {string} pageTitle
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.pageTitle = "";
    
                            /**
                             * WebPage fullMatchingImages.
                             * @member {Array.<google.cloud.vision.v1.WebDetection.IWebImage>} fullMatchingImages
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.fullMatchingImages = $util.emptyArray;
    
                            /**
                             * WebPage partialMatchingImages.
                             * @member {Array.<google.cloud.vision.v1.WebDetection.IWebImage>} partialMatchingImages
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.partialMatchingImages = $util.emptyArray;
    
                            /**
                             * Creates a new WebPage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebPage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.WebDetection.WebPage} WebPage instance
                             */
                            WebPage.create = function create(properties) {
                                return new WebPage(properties);
                            };
    
                            /**
                             * Encodes the specified WebPage message. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebPage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.pageTitle != null && Object.hasOwnProperty.call(message, "pageTitle"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageTitle);
                                if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebPage message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebPage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetection.WebPage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.pageTitle = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                                message.fullMatchingImages = [];
                                            message.fullMatchingImages.push($root.google.cloud.vision.v1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 5: {
                                            if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                                message.partialMatchingImages = [];
                                            message.partialMatchingImages.push($root.google.cloud.vision.v1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebPage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebPage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    if (!$util.isString(message.pageTitle))
                                        return "pageTitle: string expected";
                                if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                    if (!Array.isArray(message.fullMatchingImages))
                                        return "fullMatchingImages: array expected";
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                        if (error)
                                            return "fullMatchingImages." + error;
                                    }
                                }
                                if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                    if (!Array.isArray(message.partialMatchingImages))
                                        return "partialMatchingImages: array expected";
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                        if (error)
                                            return "partialMatchingImages." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a WebPage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.WebDetection.WebPage} WebPage
                             */
                            WebPage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.WebDetection.WebPage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.WebDetection.WebPage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.pageTitle != null)
                                    message.pageTitle = String(object.pageTitle);
                                if (object.fullMatchingImages) {
                                    if (!Array.isArray(object.fullMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.WebPage.fullMatchingImages: array expected");
                                    message.fullMatchingImages = [];
                                    for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                        if (typeof object.fullMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1.WebDetection.WebPage.fullMatchingImages: object expected");
                                        message.fullMatchingImages[i] = $root.google.cloud.vision.v1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                    }
                                }
                                if (object.partialMatchingImages) {
                                    if (!Array.isArray(object.partialMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1.WebDetection.WebPage.partialMatchingImages: array expected");
                                    message.partialMatchingImages = [];
                                    for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                        if (typeof object.partialMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1.WebDetection.WebPage.partialMatchingImages: object expected");
                                        message.partialMatchingImages[i] = $root.google.cloud.vision.v1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebPage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.WebPage} message WebPage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebPage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.fullMatchingImages = [];
                                    object.partialMatchingImages = [];
                                }
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                    object.pageTitle = "";
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    object.pageTitle = message.pageTitle;
                                if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                    object.fullMatchingImages = [];
                                    for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                        object.fullMatchingImages[j] = $root.google.cloud.vision.v1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                                }
                                if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                    object.partialMatchingImages = [];
                                    for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                        object.partialMatchingImages[j] = $root.google.cloud.vision.v1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this WebPage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebPage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebPage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.WebDetection.WebPage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebPage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.WebDetection.WebPage";
                            };
    
                            return WebPage;
                        })();
    
                        WebDetection.WebLabel = (function() {
    
                            /**
                             * Properties of a WebLabel.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @interface IWebLabel
                             * @property {string|null} [label] WebLabel label
                             * @property {string|null} [languageCode] WebLabel languageCode
                             */
    
                            /**
                             * Constructs a new WebLabel.
                             * @memberof google.cloud.vision.v1.WebDetection
                             * @classdesc Represents a WebLabel.
                             * @implements IWebLabel
                             * @constructor
                             * @param {google.cloud.vision.v1.WebDetection.IWebLabel=} [properties] Properties to set
                             */
                            function WebLabel(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebLabel label.
                             * @member {string} label
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.label = "";
    
                            /**
                             * WebLabel languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.languageCode = "";
    
                            /**
                             * Creates a new WebLabel instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebLabel=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1.WebDetection.WebLabel} WebLabel instance
                             */
                            WebLabel.create = function create(properties) {
                                return new WebLabel(properties);
                            };
    
                            /**
                             * Encodes the specified WebLabel message. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebLabel message, length delimited. Does not implicitly {@link google.cloud.vision.v1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1.WebDetection.WebLabel();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.label = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebLabel message.
                             * @function verify
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebLabel.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.label != null && message.hasOwnProperty("label"))
                                    if (!$util.isString(message.label))
                                        return "label: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebLabel message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1.WebDetection.WebLabel} WebLabel
                             */
                            WebLabel.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1.WebDetection.WebLabel)
                                    return object;
                                var message = new $root.google.cloud.vision.v1.WebDetection.WebLabel();
                                if (object.label != null)
                                    message.label = String(object.label);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebLabel message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1.WebDetection.WebLabel} message WebLabel
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebLabel.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.label = "";
                                    object.languageCode = "";
                                }
                                if (message.label != null && message.hasOwnProperty("label"))
                                    object.label = message.label;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                return object;
                            };
    
                            /**
                             * Converts this WebLabel to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebLabel.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebLabel
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1.WebDetection.WebLabel
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1.WebDetection.WebLabel";
                            };
    
                            return WebLabel;
                        })();
    
                        return WebDetection;
                    })();
    
                    return v1;
                })();
    
                vision.v1p1beta1 = (function() {
    
                    /**
                     * Namespace v1p1beta1.
                     * @memberof google.cloud.vision
                     * @namespace
                     */
                    var v1p1beta1 = {};
    
                    v1p1beta1.Vertex = (function() {
    
                        /**
                         * Properties of a Vertex.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IVertex
                         * @property {number|null} [x] Vertex x
                         * @property {number|null} [y] Vertex y
                         */
    
                        /**
                         * Constructs a new Vertex.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Vertex.
                         * @implements IVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IVertex=} [properties] Properties to set
                         */
                        function Vertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Vertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.x = 0;
    
                        /**
                         * Vertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.y = 0;
    
                        /**
                         * Creates a new Vertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Vertex} Vertex instance
                         */
                        Vertex.create = function create(properties) {
                            return new Vertex(properties);
                        };
    
                        /**
                         * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Vertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Vertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Vertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Vertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Vertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (!$util.isInteger(message.x))
                                    return "x: integer expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (!$util.isInteger(message.y))
                                    return "y: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Vertex} Vertex
                         */
                        Vertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Vertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Vertex();
                            if (object.x != null)
                                message.x = object.x | 0;
                            if (object.y != null)
                                message.y = object.y | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Vertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Vertex} message Vertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Vertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = message.y;
                            return object;
                        };
    
                        /**
                         * Converts this Vertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Vertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Vertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Vertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Vertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Vertex";
                        };
    
                        return Vertex;
                    })();
    
                    v1p1beta1.BoundingPoly = (function() {
    
                        /**
                         * Properties of a BoundingPoly.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p1beta1.IVertex>|null} [vertices] BoundingPoly vertices
                         */
    
                        /**
                         * Constructs a new BoundingPoly.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a BoundingPoly.
                         * @implements IBoundingPoly
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IBoundingPoly=} [properties] Properties to set
                         */
                        function BoundingPoly(properties) {
                            this.vertices = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BoundingPoly vertices.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IVertex>} vertices
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.vertices = $util.emptyArray;
    
                        /**
                         * Creates a new BoundingPoly instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBoundingPoly=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.BoundingPoly} BoundingPoly instance
                         */
                        BoundingPoly.create = function create(properties) {
                            return new BoundingPoly(properties);
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1p1beta1.BoundingPoly.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.vertices != null && message.vertices.length)
                                for (var i = 0; i < message.vertices.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.BoundingPoly.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.BoundingPoly();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.vertices && message.vertices.length))
                                            message.vertices = [];
                                        message.vertices.push($root.google.cloud.vision.v1p1beta1.Vertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BoundingPoly message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BoundingPoly.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.vertices != null && message.hasOwnProperty("vertices")) {
                                if (!Array.isArray(message.vertices))
                                    return "vertices: array expected";
                                for (var i = 0; i < message.vertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Vertex.verify(message.vertices[i]);
                                    if (error)
                                        return "vertices." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.BoundingPoly} BoundingPoly
                         */
                        BoundingPoly.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.BoundingPoly)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.BoundingPoly();
                            if (object.vertices) {
                                if (!Array.isArray(object.vertices))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.BoundingPoly.vertices: array expected");
                                message.vertices = [];
                                for (var i = 0; i < object.vertices.length; ++i) {
                                    if (typeof object.vertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.BoundingPoly.vertices: object expected");
                                    message.vertices[i] = $root.google.cloud.vision.v1p1beta1.Vertex.fromObject(object.vertices[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.BoundingPoly} message BoundingPoly
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BoundingPoly.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.vertices = [];
                            if (message.vertices && message.vertices.length) {
                                object.vertices = [];
                                for (var j = 0; j < message.vertices.length; ++j)
                                    object.vertices[j] = $root.google.cloud.vision.v1p1beta1.Vertex.toObject(message.vertices[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BoundingPoly to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BoundingPoly.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BoundingPoly
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.BoundingPoly
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BoundingPoly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.BoundingPoly";
                        };
    
                        return BoundingPoly;
                    })();
    
                    v1p1beta1.Position = (function() {
    
                        /**
                         * Properties of a Position.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IPosition
                         * @property {number|null} [x] Position x
                         * @property {number|null} [y] Position y
                         * @property {number|null} [z] Position z
                         */
    
                        /**
                         * Constructs a new Position.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Position.
                         * @implements IPosition
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IPosition=} [properties] Properties to set
                         */
                        function Position(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Position x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @instance
                         */
                        Position.prototype.x = 0;
    
                        /**
                         * Position y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @instance
                         */
                        Position.prototype.y = 0;
    
                        /**
                         * Position z.
                         * @member {number} z
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @instance
                         */
                        Position.prototype.z = 0;
    
                        /**
                         * Creates a new Position instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPosition=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Position} Position instance
                         */
                        Position.create = function create(properties) {
                            return new Position(properties);
                        };
    
                        /**
                         * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Position.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            if (message.z != null && Object.hasOwnProperty.call(message, "z"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.z);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Position.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Position();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.z = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Position message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Position.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            if (message.z != null && message.hasOwnProperty("z"))
                                if (typeof message.z !== "number")
                                    return "z: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Position message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Position} Position
                         */
                        Position.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Position)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Position();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            if (object.z != null)
                                message.z = Number(object.z);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Position message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Position} message Position
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Position.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                                object.z = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            if (message.z != null && message.hasOwnProperty("z"))
                                object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z;
                            return object;
                        };
    
                        /**
                         * Converts this Position to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Position.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Position
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Position
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Position";
                        };
    
                        return Position;
                    })();
    
                    v1p1beta1.ImageAnnotator = (function() {
    
                        /**
                         * Constructs a new ImageAnnotator service.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an ImageAnnotator
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ImageAnnotator(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ImageAnnotator.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageAnnotator;
    
                        /**
                         * Creates new ImageAnnotator service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.ImageAnnotator
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ImageAnnotator} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ImageAnnotator.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p1beta1.ImageAnnotator|batchAnnotateImages}.
                         * @memberof google.cloud.vision.v1p1beta1.ImageAnnotator
                         * @typedef BatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} [response] BatchAnnotateImagesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p1beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p1beta1.ImageAnnotator.BatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateImages = function batchAnnotateImages(request, callback) {
                            return this.rpcCall(batchAnnotateImages, $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest, $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateImages" });
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p1beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse>} Promise
                         * @variation 2
                         */
    
                        return ImageAnnotator;
                    })();
    
                    v1p1beta1.Feature = (function() {
    
                        /**
                         * Properties of a Feature.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IFeature
                         * @property {google.cloud.vision.v1p1beta1.Feature.Type|null} [type] Feature type
                         * @property {number|null} [maxResults] Feature maxResults
                         * @property {string|null} [model] Feature model
                         */
    
                        /**
                         * Constructs a new Feature.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Feature.
                         * @implements IFeature
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IFeature=} [properties] Properties to set
                         */
                        function Feature(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Feature type.
                         * @member {google.cloud.vision.v1p1beta1.Feature.Type} type
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @instance
                         */
                        Feature.prototype.type = 0;
    
                        /**
                         * Feature maxResults.
                         * @member {number} maxResults
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @instance
                         */
                        Feature.prototype.maxResults = 0;
    
                        /**
                         * Feature model.
                         * @member {string} model
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @instance
                         */
                        Feature.prototype.model = "";
    
                        /**
                         * Creates a new Feature instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFeature=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Feature} Feature instance
                         */
                        Feature.create = function create(properties) {
                            return new Feature(properties);
                        };
    
                        /**
                         * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Feature.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                            if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults);
                            if (message.model != null && Object.hasOwnProperty.call(message, "model"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.model);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Feature.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Feature();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.type = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.maxResults = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.model = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Feature message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Feature.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.type != null && message.hasOwnProperty("type"))
                                switch (message.type) {
                                default:
                                    return "type: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 11:
                                case 6:
                                case 7:
                                case 9:
                                case 10:
                                    break;
                                }
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                if (!$util.isInteger(message.maxResults))
                                    return "maxResults: integer expected";
                            if (message.model != null && message.hasOwnProperty("model"))
                                if (!$util.isString(message.model))
                                    return "model: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Feature message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Feature} Feature
                         */
                        Feature.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Feature)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Feature();
                            switch (object.type) {
                            default:
                                if (typeof object.type === "number") {
                                    message.type = object.type;
                                    break;
                                }
                                break;
                            case "TYPE_UNSPECIFIED":
                            case 0:
                                message.type = 0;
                                break;
                            case "FACE_DETECTION":
                            case 1:
                                message.type = 1;
                                break;
                            case "LANDMARK_DETECTION":
                            case 2:
                                message.type = 2;
                                break;
                            case "LOGO_DETECTION":
                            case 3:
                                message.type = 3;
                                break;
                            case "LABEL_DETECTION":
                            case 4:
                                message.type = 4;
                                break;
                            case "TEXT_DETECTION":
                            case 5:
                                message.type = 5;
                                break;
                            case "DOCUMENT_TEXT_DETECTION":
                            case 11:
                                message.type = 11;
                                break;
                            case "SAFE_SEARCH_DETECTION":
                            case 6:
                                message.type = 6;
                                break;
                            case "IMAGE_PROPERTIES":
                            case 7:
                                message.type = 7;
                                break;
                            case "CROP_HINTS":
                            case 9:
                                message.type = 9;
                                break;
                            case "WEB_DETECTION":
                            case 10:
                                message.type = 10;
                                break;
                            }
                            if (object.maxResults != null)
                                message.maxResults = object.maxResults | 0;
                            if (object.model != null)
                                message.model = String(object.model);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Feature message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Feature} message Feature
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Feature.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
                                object.maxResults = 0;
                                object.model = "";
                            }
                            if (message.type != null && message.hasOwnProperty("type"))
                                object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.Feature.Type[message.type] : message.type;
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                object.maxResults = message.maxResults;
                            if (message.model != null && message.hasOwnProperty("model"))
                                object.model = message.model;
                            return object;
                        };
    
                        /**
                         * Converts this Feature to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Feature.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Feature
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Feature
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Feature.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Feature";
                        };
    
                        /**
                         * Type enum.
                         * @name google.cloud.vision.v1p1beta1.Feature.Type
                         * @enum {number}
                         * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
                         * @property {number} FACE_DETECTION=1 FACE_DETECTION value
                         * @property {number} LANDMARK_DETECTION=2 LANDMARK_DETECTION value
                         * @property {number} LOGO_DETECTION=3 LOGO_DETECTION value
                         * @property {number} LABEL_DETECTION=4 LABEL_DETECTION value
                         * @property {number} TEXT_DETECTION=5 TEXT_DETECTION value
                         * @property {number} DOCUMENT_TEXT_DETECTION=11 DOCUMENT_TEXT_DETECTION value
                         * @property {number} SAFE_SEARCH_DETECTION=6 SAFE_SEARCH_DETECTION value
                         * @property {number} IMAGE_PROPERTIES=7 IMAGE_PROPERTIES value
                         * @property {number} CROP_HINTS=9 CROP_HINTS value
                         * @property {number} WEB_DETECTION=10 WEB_DETECTION value
                         */
                        Feature.Type = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "FACE_DETECTION"] = 1;
                            values[valuesById[2] = "LANDMARK_DETECTION"] = 2;
                            values[valuesById[3] = "LOGO_DETECTION"] = 3;
                            values[valuesById[4] = "LABEL_DETECTION"] = 4;
                            values[valuesById[5] = "TEXT_DETECTION"] = 5;
                            values[valuesById[11] = "DOCUMENT_TEXT_DETECTION"] = 11;
                            values[valuesById[6] = "SAFE_SEARCH_DETECTION"] = 6;
                            values[valuesById[7] = "IMAGE_PROPERTIES"] = 7;
                            values[valuesById[9] = "CROP_HINTS"] = 9;
                            values[valuesById[10] = "WEB_DETECTION"] = 10;
                            return values;
                        })();
    
                        return Feature;
                    })();
    
                    v1p1beta1.ImageSource = (function() {
    
                        /**
                         * Properties of an ImageSource.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IImageSource
                         * @property {string|null} [gcsImageUri] ImageSource gcsImageUri
                         * @property {string|null} [imageUri] ImageSource imageUri
                         */
    
                        /**
                         * Constructs a new ImageSource.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an ImageSource.
                         * @implements IImageSource
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IImageSource=} [properties] Properties to set
                         */
                        function ImageSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageSource gcsImageUri.
                         * @member {string} gcsImageUri
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.gcsImageUri = "";
    
                        /**
                         * ImageSource imageUri.
                         * @member {string} imageUri
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.imageUri = "";
    
                        /**
                         * Creates a new ImageSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.ImageSource} ImageSource instance
                         */
                        ImageSource.create = function create(properties) {
                            return new ImageSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsImageUri != null && Object.hasOwnProperty.call(message, "gcsImageUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsImageUri);
                            if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.ImageSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsImageUri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.imageUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                if (!$util.isString(message.gcsImageUri))
                                    return "gcsImageUri: string expected";
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                if (!$util.isString(message.imageUri))
                                    return "imageUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.ImageSource} ImageSource
                         */
                        ImageSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.ImageSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.ImageSource();
                            if (object.gcsImageUri != null)
                                message.gcsImageUri = String(object.gcsImageUri);
                            if (object.imageUri != null)
                                message.imageUri = String(object.imageUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ImageSource} message ImageSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsImageUri = "";
                                object.imageUri = "";
                            }
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                object.gcsImageUri = message.gcsImageUri;
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                object.imageUri = message.imageUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImageSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.ImageSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.ImageSource";
                        };
    
                        return ImageSource;
                    })();
    
                    v1p1beta1.Image = (function() {
    
                        /**
                         * Properties of an Image.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IImage
                         * @property {Uint8Array|null} [content] Image content
                         * @property {google.cloud.vision.v1p1beta1.IImageSource|null} [source] Image source
                         */
    
                        /**
                         * Constructs a new Image.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an Image.
                         * @implements IImage
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IImage=} [properties] Properties to set
                         */
                        function Image(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Image content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @instance
                         */
                        Image.prototype.content = $util.newBuffer([]);
    
                        /**
                         * Image source.
                         * @member {google.cloud.vision.v1p1beta1.IImageSource|null|undefined} source
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @instance
                         */
                        Image.prototype.source = null;
    
                        /**
                         * Creates a new Image instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Image} Image instance
                         */
                        Image.create = function create(properties) {
                            return new Image(properties);
                        };
    
                        /**
                         * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Image.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
                            if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                                $root.google.cloud.vision.v1p1beta1.ImageSource.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Image.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Image();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.source = $root.google.cloud.vision.v1p1beta1.ImageSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an Image message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Image.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.source != null && message.hasOwnProperty("source")) {
                                var error = $root.google.cloud.vision.v1p1beta1.ImageSource.verify(message.source);
                                if (error)
                                    return "source." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an Image message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Image} Image
                         */
                        Image.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Image)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Image();
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.source != null) {
                                if (typeof object.source !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Image.source: object expected");
                                message.source = $root.google.cloud.vision.v1p1beta1.ImageSource.fromObject(object.source);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an Image message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Image} message Image
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Image.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                                object.source = null;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            if (message.source != null && message.hasOwnProperty("source"))
                                object.source = $root.google.cloud.vision.v1p1beta1.ImageSource.toObject(message.source, options);
                            return object;
                        };
    
                        /**
                         * Converts this Image to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Image.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Image
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Image
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Image";
                        };
    
                        return Image;
                    })();
    
                    v1p1beta1.FaceAnnotation = (function() {
    
                        /**
                         * Properties of a FaceAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IFaceAnnotation
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingPoly] FaceAnnotation boundingPoly
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [fdBoundingPoly] FaceAnnotation fdBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark>|null} [landmarks] FaceAnnotation landmarks
                         * @property {number|null} [rollAngle] FaceAnnotation rollAngle
                         * @property {number|null} [panAngle] FaceAnnotation panAngle
                         * @property {number|null} [tiltAngle] FaceAnnotation tiltAngle
                         * @property {number|null} [detectionConfidence] FaceAnnotation detectionConfidence
                         * @property {number|null} [landmarkingConfidence] FaceAnnotation landmarkingConfidence
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [joyLikelihood] FaceAnnotation joyLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [sorrowLikelihood] FaceAnnotation sorrowLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [angerLikelihood] FaceAnnotation angerLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [surpriseLikelihood] FaceAnnotation surpriseLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [underExposedLikelihood] FaceAnnotation underExposedLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [blurredLikelihood] FaceAnnotation blurredLikelihood
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [headwearLikelihood] FaceAnnotation headwearLikelihood
                         */
    
                        /**
                         * Constructs a new FaceAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a FaceAnnotation.
                         * @implements IFaceAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IFaceAnnotation=} [properties] Properties to set
                         */
                        function FaceAnnotation(properties) {
                            this.landmarks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * FaceAnnotation fdBoundingPoly.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} fdBoundingPoly
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.fdBoundingPoly = null;
    
                        /**
                         * FaceAnnotation landmarks.
                         * @member {Array.<google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark>} landmarks
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarks = $util.emptyArray;
    
                        /**
                         * FaceAnnotation rollAngle.
                         * @member {number} rollAngle
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.rollAngle = 0;
    
                        /**
                         * FaceAnnotation panAngle.
                         * @member {number} panAngle
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.panAngle = 0;
    
                        /**
                         * FaceAnnotation tiltAngle.
                         * @member {number} tiltAngle
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.tiltAngle = 0;
    
                        /**
                         * FaceAnnotation detectionConfidence.
                         * @member {number} detectionConfidence
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.detectionConfidence = 0;
    
                        /**
                         * FaceAnnotation landmarkingConfidence.
                         * @member {number} landmarkingConfidence
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarkingConfidence = 0;
    
                        /**
                         * FaceAnnotation joyLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} joyLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.joyLikelihood = 0;
    
                        /**
                         * FaceAnnotation sorrowLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} sorrowLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.sorrowLikelihood = 0;
    
                        /**
                         * FaceAnnotation angerLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} angerLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.angerLikelihood = 0;
    
                        /**
                         * FaceAnnotation surpriseLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} surpriseLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.surpriseLikelihood = 0;
    
                        /**
                         * FaceAnnotation underExposedLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} underExposedLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.underExposedLikelihood = 0;
    
                        /**
                         * FaceAnnotation blurredLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} blurredLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.blurredLikelihood = 0;
    
                        /**
                         * FaceAnnotation headwearLikelihood.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} headwearLikelihood
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.headwearLikelihood = 0;
    
                        /**
                         * Creates a new FaceAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFaceAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation} FaceAnnotation instance
                         */
                        FaceAnnotation.create = function create(properties) {
                            return new FaceAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.FaceAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fdBoundingPoly != null && Object.hasOwnProperty.call(message, "fdBoundingPoly"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.fdBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.landmarks != null && message.landmarks.length)
                                for (var i = 0; i < message.landmarks.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.encode(message.landmarks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.rollAngle != null && Object.hasOwnProperty.call(message, "rollAngle"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.rollAngle);
                            if (message.panAngle != null && Object.hasOwnProperty.call(message, "panAngle"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.panAngle);
                            if (message.tiltAngle != null && Object.hasOwnProperty.call(message, "tiltAngle"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.tiltAngle);
                            if (message.detectionConfidence != null && Object.hasOwnProperty.call(message, "detectionConfidence"))
                                writer.uint32(/* id 7, wireType 5 =*/61).float(message.detectionConfidence);
                            if (message.landmarkingConfidence != null && Object.hasOwnProperty.call(message, "landmarkingConfidence"))
                                writer.uint32(/* id 8, wireType 5 =*/69).float(message.landmarkingConfidence);
                            if (message.joyLikelihood != null && Object.hasOwnProperty.call(message, "joyLikelihood"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.joyLikelihood);
                            if (message.sorrowLikelihood != null && Object.hasOwnProperty.call(message, "sorrowLikelihood"))
                                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.sorrowLikelihood);
                            if (message.angerLikelihood != null && Object.hasOwnProperty.call(message, "angerLikelihood"))
                                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.angerLikelihood);
                            if (message.surpriseLikelihood != null && Object.hasOwnProperty.call(message, "surpriseLikelihood"))
                                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.surpriseLikelihood);
                            if (message.underExposedLikelihood != null && Object.hasOwnProperty.call(message, "underExposedLikelihood"))
                                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.underExposedLikelihood);
                            if (message.blurredLikelihood != null && Object.hasOwnProperty.call(message, "blurredLikelihood"))
                                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.blurredLikelihood);
                            if (message.headwearLikelihood != null && Object.hasOwnProperty.call(message, "headwearLikelihood"))
                                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.headwearLikelihood);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.FaceAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.FaceAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.fdBoundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.landmarks && message.landmarks.length))
                                            message.landmarks = [];
                                        message.landmarks.push($root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.rollAngle = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.panAngle = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.tiltAngle = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.detectionConfidence = reader.float();
                                        break;
                                    }
                                case 8: {
                                        message.landmarkingConfidence = reader.float();
                                        break;
                                    }
                                case 9: {
                                        message.joyLikelihood = reader.int32();
                                        break;
                                    }
                                case 10: {
                                        message.sorrowLikelihood = reader.int32();
                                        break;
                                    }
                                case 11: {
                                        message.angerLikelihood = reader.int32();
                                        break;
                                    }
                                case 12: {
                                        message.surpriseLikelihood = reader.int32();
                                        break;
                                    }
                                case 13: {
                                        message.underExposedLikelihood = reader.int32();
                                        break;
                                    }
                                case 14: {
                                        message.blurredLikelihood = reader.int32();
                                        break;
                                    }
                                case 15: {
                                        message.headwearLikelihood = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.fdBoundingPoly);
                                if (error)
                                    return "fdBoundingPoly." + error;
                            }
                            if (message.landmarks != null && message.hasOwnProperty("landmarks")) {
                                if (!Array.isArray(message.landmarks))
                                    return "landmarks: array expected";
                                for (var i = 0; i < message.landmarks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.verify(message.landmarks[i]);
                                    if (error)
                                        return "landmarks." + error;
                                }
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                if (typeof message.rollAngle !== "number")
                                    return "rollAngle: number expected";
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                if (typeof message.panAngle !== "number")
                                    return "panAngle: number expected";
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                if (typeof message.tiltAngle !== "number")
                                    return "tiltAngle: number expected";
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                if (typeof message.detectionConfidence !== "number")
                                    return "detectionConfidence: number expected";
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                if (typeof message.landmarkingConfidence !== "number")
                                    return "landmarkingConfidence: number expected";
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                switch (message.joyLikelihood) {
                                default:
                                    return "joyLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                switch (message.sorrowLikelihood) {
                                default:
                                    return "sorrowLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                switch (message.angerLikelihood) {
                                default:
                                    return "angerLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                switch (message.surpriseLikelihood) {
                                default:
                                    return "surpriseLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                switch (message.underExposedLikelihood) {
                                default:
                                    return "underExposedLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                switch (message.blurredLikelihood) {
                                default:
                                    return "blurredLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                switch (message.headwearLikelihood) {
                                default:
                                    return "headwearLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a FaceAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation} FaceAnnotation
                         */
                        FaceAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.FaceAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.FaceAnnotation();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.FaceAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.fdBoundingPoly != null) {
                                if (typeof object.fdBoundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.FaceAnnotation.fdBoundingPoly: object expected");
                                message.fdBoundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.fdBoundingPoly);
                            }
                            if (object.landmarks) {
                                if (!Array.isArray(object.landmarks))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.FaceAnnotation.landmarks: array expected");
                                message.landmarks = [];
                                for (var i = 0; i < object.landmarks.length; ++i) {
                                    if (typeof object.landmarks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.FaceAnnotation.landmarks: object expected");
                                    message.landmarks[i] = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.fromObject(object.landmarks[i]);
                                }
                            }
                            if (object.rollAngle != null)
                                message.rollAngle = Number(object.rollAngle);
                            if (object.panAngle != null)
                                message.panAngle = Number(object.panAngle);
                            if (object.tiltAngle != null)
                                message.tiltAngle = Number(object.tiltAngle);
                            if (object.detectionConfidence != null)
                                message.detectionConfidence = Number(object.detectionConfidence);
                            if (object.landmarkingConfidence != null)
                                message.landmarkingConfidence = Number(object.landmarkingConfidence);
                            switch (object.joyLikelihood) {
                            default:
                                if (typeof object.joyLikelihood === "number") {
                                    message.joyLikelihood = object.joyLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.joyLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.joyLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.joyLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.joyLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.joyLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.joyLikelihood = 5;
                                break;
                            }
                            switch (object.sorrowLikelihood) {
                            default:
                                if (typeof object.sorrowLikelihood === "number") {
                                    message.sorrowLikelihood = object.sorrowLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.sorrowLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.sorrowLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.sorrowLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.sorrowLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.sorrowLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.sorrowLikelihood = 5;
                                break;
                            }
                            switch (object.angerLikelihood) {
                            default:
                                if (typeof object.angerLikelihood === "number") {
                                    message.angerLikelihood = object.angerLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.angerLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.angerLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.angerLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.angerLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.angerLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.angerLikelihood = 5;
                                break;
                            }
                            switch (object.surpriseLikelihood) {
                            default:
                                if (typeof object.surpriseLikelihood === "number") {
                                    message.surpriseLikelihood = object.surpriseLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.surpriseLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.surpriseLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.surpriseLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.surpriseLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.surpriseLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.surpriseLikelihood = 5;
                                break;
                            }
                            switch (object.underExposedLikelihood) {
                            default:
                                if (typeof object.underExposedLikelihood === "number") {
                                    message.underExposedLikelihood = object.underExposedLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.underExposedLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.underExposedLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.underExposedLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.underExposedLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.underExposedLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.underExposedLikelihood = 5;
                                break;
                            }
                            switch (object.blurredLikelihood) {
                            default:
                                if (typeof object.blurredLikelihood === "number") {
                                    message.blurredLikelihood = object.blurredLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blurredLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.blurredLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.blurredLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.blurredLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.blurredLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.blurredLikelihood = 5;
                                break;
                            }
                            switch (object.headwearLikelihood) {
                            default:
                                if (typeof object.headwearLikelihood === "number") {
                                    message.headwearLikelihood = object.headwearLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.headwearLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.headwearLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.headwearLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.headwearLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.headwearLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.headwearLikelihood = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.FaceAnnotation} message FaceAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.landmarks = [];
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.fdBoundingPoly = null;
                                object.rollAngle = 0;
                                object.panAngle = 0;
                                object.tiltAngle = 0;
                                object.detectionConfidence = 0;
                                object.landmarkingConfidence = 0;
                                object.joyLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.sorrowLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.angerLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.surpriseLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.underExposedLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.blurredLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.headwearLikelihood = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly"))
                                object.fdBoundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.fdBoundingPoly, options);
                            if (message.landmarks && message.landmarks.length) {
                                object.landmarks = [];
                                for (var j = 0; j < message.landmarks.length; ++j)
                                    object.landmarks[j] = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.toObject(message.landmarks[j], options);
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                object.rollAngle = options.json && !isFinite(message.rollAngle) ? String(message.rollAngle) : message.rollAngle;
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                object.panAngle = options.json && !isFinite(message.panAngle) ? String(message.panAngle) : message.panAngle;
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                object.tiltAngle = options.json && !isFinite(message.tiltAngle) ? String(message.tiltAngle) : message.tiltAngle;
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                object.detectionConfidence = options.json && !isFinite(message.detectionConfidence) ? String(message.detectionConfidence) : message.detectionConfidence;
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence;
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood;
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood;
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood;
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood;
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood;
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood;
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p1beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood;
                            return object;
                        };
    
                        /**
                         * Converts this FaceAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.FaceAnnotation";
                        };
    
                        FaceAnnotation.Landmark = (function() {
    
                            /**
                             * Properties of a Landmark.
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                             * @interface ILandmark
                             * @property {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type|null} [type] Landmark type
                             * @property {google.cloud.vision.v1p1beta1.IPosition|null} [position] Landmark position
                             */
    
                            /**
                             * Constructs a new Landmark.
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation
                             * @classdesc Represents a Landmark.
                             * @implements ILandmark
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             */
                            function Landmark(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Landmark type.
                             * @member {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type} type
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.type = 0;
    
                            /**
                             * Landmark position.
                             * @member {google.cloud.vision.v1p1beta1.IPosition|null|undefined} position
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.position = null;
    
                            /**
                             * Creates a new Landmark instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} Landmark instance
                             */
                            Landmark.create = function create(properties) {
                                return new Landmark(properties);
                            };
    
                            /**
                             * Encodes the specified Landmark message. Does not implicitly {@link google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                                if (message.position != null && Object.hasOwnProperty.call(message, "position"))
                                    $root.google.cloud.vision.v1p1beta1.Position.encode(message.position, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Landmark message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 3: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 4: {
                                            message.position = $root.google.cloud.vision.v1p1beta1.Position.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Landmark message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Landmark.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case 6:
                                    case 7:
                                    case 8:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                    case 33:
                                    case 34:
                                        break;
                                    }
                                if (message.position != null && message.hasOwnProperty("position")) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Position.verify(message.position);
                                    if (error)
                                        return "position." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a Landmark message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} Landmark
                             */
                            Landmark.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN_LANDMARK":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "LEFT_EYE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "RIGHT_EYE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "LEFT_OF_LEFT_EYEBROW":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "RIGHT_OF_LEFT_EYEBROW":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LEFT_OF_RIGHT_EYEBROW":
                                case 5:
                                    message.type = 5;
                                    break;
                                case "RIGHT_OF_RIGHT_EYEBROW":
                                case 6:
                                    message.type = 6;
                                    break;
                                case "MIDPOINT_BETWEEN_EYES":
                                case 7:
                                    message.type = 7;
                                    break;
                                case "NOSE_TIP":
                                case 8:
                                    message.type = 8;
                                    break;
                                case "UPPER_LIP":
                                case 9:
                                    message.type = 9;
                                    break;
                                case "LOWER_LIP":
                                case 10:
                                    message.type = 10;
                                    break;
                                case "MOUTH_LEFT":
                                case 11:
                                    message.type = 11;
                                    break;
                                case "MOUTH_RIGHT":
                                case 12:
                                    message.type = 12;
                                    break;
                                case "MOUTH_CENTER":
                                case 13:
                                    message.type = 13;
                                    break;
                                case "NOSE_BOTTOM_RIGHT":
                                case 14:
                                    message.type = 14;
                                    break;
                                case "NOSE_BOTTOM_LEFT":
                                case 15:
                                    message.type = 15;
                                    break;
                                case "NOSE_BOTTOM_CENTER":
                                case 16:
                                    message.type = 16;
                                    break;
                                case "LEFT_EYE_TOP_BOUNDARY":
                                case 17:
                                    message.type = 17;
                                    break;
                                case "LEFT_EYE_RIGHT_CORNER":
                                case 18:
                                    message.type = 18;
                                    break;
                                case "LEFT_EYE_BOTTOM_BOUNDARY":
                                case 19:
                                    message.type = 19;
                                    break;
                                case "LEFT_EYE_LEFT_CORNER":
                                case 20:
                                    message.type = 20;
                                    break;
                                case "RIGHT_EYE_TOP_BOUNDARY":
                                case 21:
                                    message.type = 21;
                                    break;
                                case "RIGHT_EYE_RIGHT_CORNER":
                                case 22:
                                    message.type = 22;
                                    break;
                                case "RIGHT_EYE_BOTTOM_BOUNDARY":
                                case 23:
                                    message.type = 23;
                                    break;
                                case "RIGHT_EYE_LEFT_CORNER":
                                case 24:
                                    message.type = 24;
                                    break;
                                case "LEFT_EYEBROW_UPPER_MIDPOINT":
                                case 25:
                                    message.type = 25;
                                    break;
                                case "RIGHT_EYEBROW_UPPER_MIDPOINT":
                                case 26:
                                    message.type = 26;
                                    break;
                                case "LEFT_EAR_TRAGION":
                                case 27:
                                    message.type = 27;
                                    break;
                                case "RIGHT_EAR_TRAGION":
                                case 28:
                                    message.type = 28;
                                    break;
                                case "LEFT_EYE_PUPIL":
                                case 29:
                                    message.type = 29;
                                    break;
                                case "RIGHT_EYE_PUPIL":
                                case 30:
                                    message.type = 30;
                                    break;
                                case "FOREHEAD_GLABELLA":
                                case 31:
                                    message.type = 31;
                                    break;
                                case "CHIN_GNATHION":
                                case 32:
                                    message.type = 32;
                                    break;
                                case "CHIN_LEFT_GONION":
                                case 33:
                                    message.type = 33;
                                    break;
                                case "CHIN_RIGHT_GONION":
                                case 34:
                                    message.type = 34;
                                    break;
                                }
                                if (object.position != null) {
                                    if (typeof object.position !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.position: object expected");
                                    message.position = $root.google.cloud.vision.v1p1beta1.Position.fromObject(object.position);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Landmark message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark} message Landmark
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Landmark.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN_LANDMARK" : 0;
                                    object.position = null;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type[message.type] : message.type;
                                if (message.position != null && message.hasOwnProperty("position"))
                                    object.position = $root.google.cloud.vision.v1p1beta1.Position.toObject(message.position, options);
                                return object;
                            };
    
                            /**
                             * Converts this Landmark to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Landmark.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Landmark
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Landmark.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark";
                            };
    
                            /**
                             * Type enum.
                             * @name google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Type
                             * @enum {number}
                             * @property {number} UNKNOWN_LANDMARK=0 UNKNOWN_LANDMARK value
                             * @property {number} LEFT_EYE=1 LEFT_EYE value
                             * @property {number} RIGHT_EYE=2 RIGHT_EYE value
                             * @property {number} LEFT_OF_LEFT_EYEBROW=3 LEFT_OF_LEFT_EYEBROW value
                             * @property {number} RIGHT_OF_LEFT_EYEBROW=4 RIGHT_OF_LEFT_EYEBROW value
                             * @property {number} LEFT_OF_RIGHT_EYEBROW=5 LEFT_OF_RIGHT_EYEBROW value
                             * @property {number} RIGHT_OF_RIGHT_EYEBROW=6 RIGHT_OF_RIGHT_EYEBROW value
                             * @property {number} MIDPOINT_BETWEEN_EYES=7 MIDPOINT_BETWEEN_EYES value
                             * @property {number} NOSE_TIP=8 NOSE_TIP value
                             * @property {number} UPPER_LIP=9 UPPER_LIP value
                             * @property {number} LOWER_LIP=10 LOWER_LIP value
                             * @property {number} MOUTH_LEFT=11 MOUTH_LEFT value
                             * @property {number} MOUTH_RIGHT=12 MOUTH_RIGHT value
                             * @property {number} MOUTH_CENTER=13 MOUTH_CENTER value
                             * @property {number} NOSE_BOTTOM_RIGHT=14 NOSE_BOTTOM_RIGHT value
                             * @property {number} NOSE_BOTTOM_LEFT=15 NOSE_BOTTOM_LEFT value
                             * @property {number} NOSE_BOTTOM_CENTER=16 NOSE_BOTTOM_CENTER value
                             * @property {number} LEFT_EYE_TOP_BOUNDARY=17 LEFT_EYE_TOP_BOUNDARY value
                             * @property {number} LEFT_EYE_RIGHT_CORNER=18 LEFT_EYE_RIGHT_CORNER value
                             * @property {number} LEFT_EYE_BOTTOM_BOUNDARY=19 LEFT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} LEFT_EYE_LEFT_CORNER=20 LEFT_EYE_LEFT_CORNER value
                             * @property {number} RIGHT_EYE_TOP_BOUNDARY=21 RIGHT_EYE_TOP_BOUNDARY value
                             * @property {number} RIGHT_EYE_RIGHT_CORNER=22 RIGHT_EYE_RIGHT_CORNER value
                             * @property {number} RIGHT_EYE_BOTTOM_BOUNDARY=23 RIGHT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} RIGHT_EYE_LEFT_CORNER=24 RIGHT_EYE_LEFT_CORNER value
                             * @property {number} LEFT_EYEBROW_UPPER_MIDPOINT=25 LEFT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} RIGHT_EYEBROW_UPPER_MIDPOINT=26 RIGHT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} LEFT_EAR_TRAGION=27 LEFT_EAR_TRAGION value
                             * @property {number} RIGHT_EAR_TRAGION=28 RIGHT_EAR_TRAGION value
                             * @property {number} LEFT_EYE_PUPIL=29 LEFT_EYE_PUPIL value
                             * @property {number} RIGHT_EYE_PUPIL=30 RIGHT_EYE_PUPIL value
                             * @property {number} FOREHEAD_GLABELLA=31 FOREHEAD_GLABELLA value
                             * @property {number} CHIN_GNATHION=32 CHIN_GNATHION value
                             * @property {number} CHIN_LEFT_GONION=33 CHIN_LEFT_GONION value
                             * @property {number} CHIN_RIGHT_GONION=34 CHIN_RIGHT_GONION value
                             */
                            Landmark.Type = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN_LANDMARK"] = 0;
                                values[valuesById[1] = "LEFT_EYE"] = 1;
                                values[valuesById[2] = "RIGHT_EYE"] = 2;
                                values[valuesById[3] = "LEFT_OF_LEFT_EYEBROW"] = 3;
                                values[valuesById[4] = "RIGHT_OF_LEFT_EYEBROW"] = 4;
                                values[valuesById[5] = "LEFT_OF_RIGHT_EYEBROW"] = 5;
                                values[valuesById[6] = "RIGHT_OF_RIGHT_EYEBROW"] = 6;
                                values[valuesById[7] = "MIDPOINT_BETWEEN_EYES"] = 7;
                                values[valuesById[8] = "NOSE_TIP"] = 8;
                                values[valuesById[9] = "UPPER_LIP"] = 9;
                                values[valuesById[10] = "LOWER_LIP"] = 10;
                                values[valuesById[11] = "MOUTH_LEFT"] = 11;
                                values[valuesById[12] = "MOUTH_RIGHT"] = 12;
                                values[valuesById[13] = "MOUTH_CENTER"] = 13;
                                values[valuesById[14] = "NOSE_BOTTOM_RIGHT"] = 14;
                                values[valuesById[15] = "NOSE_BOTTOM_LEFT"] = 15;
                                values[valuesById[16] = "NOSE_BOTTOM_CENTER"] = 16;
                                values[valuesById[17] = "LEFT_EYE_TOP_BOUNDARY"] = 17;
                                values[valuesById[18] = "LEFT_EYE_RIGHT_CORNER"] = 18;
                                values[valuesById[19] = "LEFT_EYE_BOTTOM_BOUNDARY"] = 19;
                                values[valuesById[20] = "LEFT_EYE_LEFT_CORNER"] = 20;
                                values[valuesById[21] = "RIGHT_EYE_TOP_BOUNDARY"] = 21;
                                values[valuesById[22] = "RIGHT_EYE_RIGHT_CORNER"] = 22;
                                values[valuesById[23] = "RIGHT_EYE_BOTTOM_BOUNDARY"] = 23;
                                values[valuesById[24] = "RIGHT_EYE_LEFT_CORNER"] = 24;
                                values[valuesById[25] = "LEFT_EYEBROW_UPPER_MIDPOINT"] = 25;
                                values[valuesById[26] = "RIGHT_EYEBROW_UPPER_MIDPOINT"] = 26;
                                values[valuesById[27] = "LEFT_EAR_TRAGION"] = 27;
                                values[valuesById[28] = "RIGHT_EAR_TRAGION"] = 28;
                                values[valuesById[29] = "LEFT_EYE_PUPIL"] = 29;
                                values[valuesById[30] = "RIGHT_EYE_PUPIL"] = 30;
                                values[valuesById[31] = "FOREHEAD_GLABELLA"] = 31;
                                values[valuesById[32] = "CHIN_GNATHION"] = 32;
                                values[valuesById[33] = "CHIN_LEFT_GONION"] = 33;
                                values[valuesById[34] = "CHIN_RIGHT_GONION"] = 34;
                                return values;
                            })();
    
                            return Landmark;
                        })();
    
                        return FaceAnnotation;
                    })();
    
                    v1p1beta1.LocationInfo = (function() {
    
                        /**
                         * Properties of a LocationInfo.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ILocationInfo
                         * @property {google.type.ILatLng|null} [latLng] LocationInfo latLng
                         */
    
                        /**
                         * Constructs a new LocationInfo.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a LocationInfo.
                         * @implements ILocationInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ILocationInfo=} [properties] Properties to set
                         */
                        function LocationInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocationInfo latLng.
                         * @member {google.type.ILatLng|null|undefined} latLng
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @instance
                         */
                        LocationInfo.prototype.latLng = null;
    
                        /**
                         * Creates a new LocationInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILocationInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.LocationInfo} LocationInfo instance
                         */
                        LocationInfo.create = function create(properties) {
                            return new LocationInfo(properties);
                        };
    
                        /**
                         * Encodes the specified LocationInfo message. Does not implicitly {@link google.cloud.vision.v1p1beta1.LocationInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
                                $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocationInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.LocationInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.LocationInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocationInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocationInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLng != null && message.hasOwnProperty("latLng")) {
                                var error = $root.google.type.LatLng.verify(message.latLng);
                                if (error)
                                    return "latLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocationInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.LocationInfo} LocationInfo
                         */
                        LocationInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.LocationInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.LocationInfo();
                            if (object.latLng != null) {
                                if (typeof object.latLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.LocationInfo.latLng: object expected");
                                message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocationInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.LocationInfo} message LocationInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocationInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.latLng = null;
                            if (message.latLng != null && message.hasOwnProperty("latLng"))
                                object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocationInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocationInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocationInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.LocationInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.LocationInfo";
                        };
    
                        return LocationInfo;
                    })();
    
                    v1p1beta1.Property = (function() {
    
                        /**
                         * Properties of a Property.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IProperty
                         * @property {string|null} [name] Property name
                         * @property {string|null} [value] Property value
                         * @property {number|Long|null} [uint64Value] Property uint64Value
                         */
    
                        /**
                         * Constructs a new Property.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Property.
                         * @implements IProperty
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IProperty=} [properties] Properties to set
                         */
                        function Property(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Property name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @instance
                         */
                        Property.prototype.name = "";
    
                        /**
                         * Property value.
                         * @member {string} value
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @instance
                         */
                        Property.prototype.value = "";
    
                        /**
                         * Property uint64Value.
                         * @member {number|Long} uint64Value
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @instance
                         */
                        Property.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                        /**
                         * Creates a new Property instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IProperty=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Property} Property instance
                         */
                        Property.create = function create(properties) {
                            return new Property(properties);
                        };
    
                        /**
                         * Encodes the specified Property message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Property.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                            if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Property.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Property();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.value = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.uint64Value = reader.uint64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Property message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Property.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.value != null && message.hasOwnProperty("value"))
                                if (!$util.isString(message.value))
                                    return "value: string expected";
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high)))
                                    return "uint64Value: integer|Long expected";
                            return null;
                        };
    
                        /**
                         * Creates a Property message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Property} Property
                         */
                        Property.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Property)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Property();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.value != null)
                                message.value = String(object.value);
                            if (object.uint64Value != null)
                                if ($util.Long)
                                    (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true;
                                else if (typeof object.uint64Value === "string")
                                    message.uint64Value = parseInt(object.uint64Value, 10);
                                else if (typeof object.uint64Value === "number")
                                    message.uint64Value = object.uint64Value;
                                else if (typeof object.uint64Value === "object")
                                    message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Property message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Property} message Property
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Property.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.value = "";
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, true);
                                    object.uint64Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.uint64Value = options.longs === String ? "0" : 0;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.value != null && message.hasOwnProperty("value"))
                                object.value = message.value;
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (typeof message.uint64Value === "number")
                                    object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value;
                                else
                                    object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value;
                            return object;
                        };
    
                        /**
                         * Converts this Property to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Property.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Property
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Property
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Property";
                        };
    
                        return Property;
                    })();
    
                    v1p1beta1.EntityAnnotation = (function() {
    
                        /**
                         * Properties of an EntityAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IEntityAnnotation
                         * @property {string|null} [mid] EntityAnnotation mid
                         * @property {string|null} [locale] EntityAnnotation locale
                         * @property {string|null} [description] EntityAnnotation description
                         * @property {number|null} [score] EntityAnnotation score
                         * @property {number|null} [confidence] EntityAnnotation confidence
                         * @property {number|null} [topicality] EntityAnnotation topicality
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingPoly] EntityAnnotation boundingPoly
                         * @property {Array.<google.cloud.vision.v1p1beta1.ILocationInfo>|null} [locations] EntityAnnotation locations
                         * @property {Array.<google.cloud.vision.v1p1beta1.IProperty>|null} [properties] EntityAnnotation properties
                         */
    
                        /**
                         * Constructs a new EntityAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an EntityAnnotation.
                         * @implements IEntityAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IEntityAnnotation=} [properties] Properties to set
                         */
                        function EntityAnnotation(properties) {
                            this.locations = [];
                            this.properties = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * EntityAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.mid = "";
    
                        /**
                         * EntityAnnotation locale.
                         * @member {string} locale
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locale = "";
    
                        /**
                         * EntityAnnotation description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.description = "";
    
                        /**
                         * EntityAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.score = 0;
    
                        /**
                         * EntityAnnotation confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.confidence = 0;
    
                        /**
                         * EntityAnnotation topicality.
                         * @member {number} topicality
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.topicality = 0;
    
                        /**
                         * EntityAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * EntityAnnotation locations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.ILocationInfo>} locations
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locations = $util.emptyArray;
    
                        /**
                         * EntityAnnotation properties.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IProperty>} properties
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.properties = $util.emptyArray;
    
                        /**
                         * Creates a new EntityAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IEntityAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.EntityAnnotation} EntityAnnotation instance
                         */
                        EntityAnnotation.create = function create(properties) {
                            return new EntityAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.EntityAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.locale != null && Object.hasOwnProperty.call(message, "locale"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.locale);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            if (message.topicality != null && Object.hasOwnProperty.call(message, "topicality"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.topicality);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                            if (message.locations != null && message.locations.length)
                                for (var i = 0; i < message.locations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.LocationInfo.encode(message.locations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.properties != null && message.properties.length)
                                for (var i = 0; i < message.properties.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Property.encode(message.properties[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.EntityAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.EntityAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.locale = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.topicality = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        if (!(message.locations && message.locations.length))
                                            message.locations = [];
                                        message.locations.push($root.google.cloud.vision.v1p1beta1.LocationInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 9: {
                                        if (!(message.properties && message.properties.length))
                                            message.properties = [];
                                        message.properties.push($root.google.cloud.vision.v1p1beta1.Property.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an EntityAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        EntityAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                if (!$util.isString(message.locale))
                                    return "locale: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                if (typeof message.topicality !== "number")
                                    return "topicality: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.locations != null && message.hasOwnProperty("locations")) {
                                if (!Array.isArray(message.locations))
                                    return "locations: array expected";
                                for (var i = 0; i < message.locations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.LocationInfo.verify(message.locations[i]);
                                    if (error)
                                        return "locations." + error;
                                }
                            }
                            if (message.properties != null && message.hasOwnProperty("properties")) {
                                if (!Array.isArray(message.properties))
                                    return "properties: array expected";
                                for (var i = 0; i < message.properties.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Property.verify(message.properties[i]);
                                    if (error)
                                        return "properties." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an EntityAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.EntityAnnotation} EntityAnnotation
                         */
                        EntityAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.EntityAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.EntityAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.locale != null)
                                message.locale = String(object.locale);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.topicality != null)
                                message.topicality = Number(object.topicality);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.EntityAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.locations) {
                                if (!Array.isArray(object.locations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.EntityAnnotation.locations: array expected");
                                message.locations = [];
                                for (var i = 0; i < object.locations.length; ++i) {
                                    if (typeof object.locations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.EntityAnnotation.locations: object expected");
                                    message.locations[i] = $root.google.cloud.vision.v1p1beta1.LocationInfo.fromObject(object.locations[i]);
                                }
                            }
                            if (object.properties) {
                                if (!Array.isArray(object.properties))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.EntityAnnotation.properties: array expected");
                                message.properties = [];
                                for (var i = 0; i < object.properties.length; ++i) {
                                    if (typeof object.properties[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.EntityAnnotation.properties: object expected");
                                    message.properties[i] = $root.google.cloud.vision.v1p1beta1.Property.fromObject(object.properties[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an EntityAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.EntityAnnotation} message EntityAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        EntityAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.locations = [];
                                object.properties = [];
                            }
                            if (options.defaults) {
                                object.mid = "";
                                object.locale = "";
                                object.description = "";
                                object.score = 0;
                                object.confidence = 0;
                                object.topicality = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                object.locale = message.locale;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                object.topicality = options.json && !isFinite(message.topicality) ? String(message.topicality) : message.topicality;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.locations && message.locations.length) {
                                object.locations = [];
                                for (var j = 0; j < message.locations.length; ++j)
                                    object.locations[j] = $root.google.cloud.vision.v1p1beta1.LocationInfo.toObject(message.locations[j], options);
                            }
                            if (message.properties && message.properties.length) {
                                object.properties = [];
                                for (var j = 0; j < message.properties.length; ++j)
                                    object.properties[j] = $root.google.cloud.vision.v1p1beta1.Property.toObject(message.properties[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this EntityAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        EntityAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for EntityAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.EntityAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        EntityAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.EntityAnnotation";
                        };
    
                        return EntityAnnotation;
                    })();
    
                    v1p1beta1.SafeSearchAnnotation = (function() {
    
                        /**
                         * Properties of a SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ISafeSearchAnnotation
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [adult] SafeSearchAnnotation adult
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [spoof] SafeSearchAnnotation spoof
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [medical] SafeSearchAnnotation medical
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [violence] SafeSearchAnnotation violence
                         * @property {google.cloud.vision.v1p1beta1.Likelihood|null} [racy] SafeSearchAnnotation racy
                         */
    
                        /**
                         * Constructs a new SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a SafeSearchAnnotation.
                         * @implements ISafeSearchAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         */
                        function SafeSearchAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * SafeSearchAnnotation adult.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} adult
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.adult = 0;
    
                        /**
                         * SafeSearchAnnotation spoof.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} spoof
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.spoof = 0;
    
                        /**
                         * SafeSearchAnnotation medical.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} medical
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.medical = 0;
    
                        /**
                         * SafeSearchAnnotation violence.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} violence
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.violence = 0;
    
                        /**
                         * SafeSearchAnnotation racy.
                         * @member {google.cloud.vision.v1p1beta1.Likelihood} racy
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.racy = 0;
    
                        /**
                         * Creates a new SafeSearchAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.SafeSearchAnnotation} SafeSearchAnnotation instance
                         */
                        SafeSearchAnnotation.create = function create(properties) {
                            return new SafeSearchAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.adult != null && Object.hasOwnProperty.call(message, "adult"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adult);
                            if (message.spoof != null && Object.hasOwnProperty.call(message, "spoof"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.spoof);
                            if (message.medical != null && Object.hasOwnProperty.call(message, "medical"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.medical);
                            if (message.violence != null && Object.hasOwnProperty.call(message, "violence"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.violence);
                            if (message.racy != null && Object.hasOwnProperty.call(message, "racy"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.racy);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.adult = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.spoof = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.medical = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.violence = reader.int32();
                                        break;
                                    }
                                case 9: {
                                        message.racy = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a SafeSearchAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        SafeSearchAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                switch (message.adult) {
                                default:
                                    return "adult: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                switch (message.spoof) {
                                default:
                                    return "spoof: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                switch (message.medical) {
                                default:
                                    return "medical: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                switch (message.violence) {
                                default:
                                    return "violence: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                switch (message.racy) {
                                default:
                                    return "racy: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a SafeSearchAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         */
                        SafeSearchAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation();
                            switch (object.adult) {
                            default:
                                if (typeof object.adult === "number") {
                                    message.adult = object.adult;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.adult = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.adult = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.adult = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.adult = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.adult = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.adult = 5;
                                break;
                            }
                            switch (object.spoof) {
                            default:
                                if (typeof object.spoof === "number") {
                                    message.spoof = object.spoof;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.spoof = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.spoof = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.spoof = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.spoof = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.spoof = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.spoof = 5;
                                break;
                            }
                            switch (object.medical) {
                            default:
                                if (typeof object.medical === "number") {
                                    message.medical = object.medical;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.medical = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.medical = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.medical = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.medical = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.medical = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.medical = 5;
                                break;
                            }
                            switch (object.violence) {
                            default:
                                if (typeof object.violence === "number") {
                                    message.violence = object.violence;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.violence = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.violence = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.violence = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.violence = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.violence = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.violence = 5;
                                break;
                            }
                            switch (object.racy) {
                            default:
                                if (typeof object.racy === "number") {
                                    message.racy = object.racy;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.racy = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.racy = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.racy = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.racy = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.racy = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.racy = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a SafeSearchAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.SafeSearchAnnotation} message SafeSearchAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        SafeSearchAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.adult = options.enums === String ? "UNKNOWN" : 0;
                                object.spoof = options.enums === String ? "UNKNOWN" : 0;
                                object.medical = options.enums === String ? "UNKNOWN" : 0;
                                object.violence = options.enums === String ? "UNKNOWN" : 0;
                                object.racy = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                object.adult = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p1beta1.Likelihood[message.adult] : message.adult;
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                object.spoof = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p1beta1.Likelihood[message.spoof] : message.spoof;
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                object.medical = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p1beta1.Likelihood[message.medical] : message.medical;
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                object.violence = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p1beta1.Likelihood[message.violence] : message.violence;
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                object.racy = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p1beta1.Likelihood[message.racy] : message.racy;
                            return object;
                        };
    
                        /**
                         * Converts this SafeSearchAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        SafeSearchAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for SafeSearchAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.SafeSearchAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        SafeSearchAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.SafeSearchAnnotation";
                        };
    
                        return SafeSearchAnnotation;
                    })();
    
                    v1p1beta1.LatLongRect = (function() {
    
                        /**
                         * Properties of a LatLongRect.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ILatLongRect
                         * @property {google.type.ILatLng|null} [minLatLng] LatLongRect minLatLng
                         * @property {google.type.ILatLng|null} [maxLatLng] LatLongRect maxLatLng
                         */
    
                        /**
                         * Constructs a new LatLongRect.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a LatLongRect.
                         * @implements ILatLongRect
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ILatLongRect=} [properties] Properties to set
                         */
                        function LatLongRect(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LatLongRect minLatLng.
                         * @member {google.type.ILatLng|null|undefined} minLatLng
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.minLatLng = null;
    
                        /**
                         * LatLongRect maxLatLng.
                         * @member {google.type.ILatLng|null|undefined} maxLatLng
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.maxLatLng = null;
    
                        /**
                         * Creates a new LatLongRect instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILatLongRect=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.LatLongRect} LatLongRect instance
                         */
                        LatLongRect.create = function create(properties) {
                            return new LatLongRect(properties);
                        };
    
                        /**
                         * Encodes the specified LatLongRect message. Does not implicitly {@link google.cloud.vision.v1p1beta1.LatLongRect.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.minLatLng != null && Object.hasOwnProperty.call(message, "minLatLng"))
                                $root.google.type.LatLng.encode(message.minLatLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.maxLatLng != null && Object.hasOwnProperty.call(message, "maxLatLng"))
                                $root.google.type.LatLng.encode(message.maxLatLng, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LatLongRect message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.LatLongRect.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.LatLongRect();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.minLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.maxLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LatLongRect message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LatLongRect.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.minLatLng);
                                if (error)
                                    return "minLatLng." + error;
                            }
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.maxLatLng);
                                if (error)
                                    return "maxLatLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LatLongRect message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.LatLongRect} LatLongRect
                         */
                        LatLongRect.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.LatLongRect)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.LatLongRect();
                            if (object.minLatLng != null) {
                                if (typeof object.minLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.LatLongRect.minLatLng: object expected");
                                message.minLatLng = $root.google.type.LatLng.fromObject(object.minLatLng);
                            }
                            if (object.maxLatLng != null) {
                                if (typeof object.maxLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.LatLongRect.maxLatLng: object expected");
                                message.maxLatLng = $root.google.type.LatLng.fromObject(object.maxLatLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LatLongRect message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.LatLongRect} message LatLongRect
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LatLongRect.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.minLatLng = null;
                                object.maxLatLng = null;
                            }
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng"))
                                object.minLatLng = $root.google.type.LatLng.toObject(message.minLatLng, options);
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng"))
                                object.maxLatLng = $root.google.type.LatLng.toObject(message.maxLatLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LatLongRect to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LatLongRect.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LatLongRect
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.LatLongRect
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LatLongRect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.LatLongRect";
                        };
    
                        return LatLongRect;
                    })();
    
                    v1p1beta1.ColorInfo = (function() {
    
                        /**
                         * Properties of a ColorInfo.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IColorInfo
                         * @property {google.type.IColor|null} [color] ColorInfo color
                         * @property {number|null} [score] ColorInfo score
                         * @property {number|null} [pixelFraction] ColorInfo pixelFraction
                         */
    
                        /**
                         * Constructs a new ColorInfo.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a ColorInfo.
                         * @implements IColorInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IColorInfo=} [properties] Properties to set
                         */
                        function ColorInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ColorInfo color.
                         * @member {google.type.IColor|null|undefined} color
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.color = null;
    
                        /**
                         * ColorInfo score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.score = 0;
    
                        /**
                         * ColorInfo pixelFraction.
                         * @member {number} pixelFraction
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.pixelFraction = 0;
    
                        /**
                         * Creates a new ColorInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IColorInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.ColorInfo} ColorInfo instance
                         */
                        ColorInfo.create = function create(properties) {
                            return new ColorInfo(properties);
                        };
    
                        /**
                         * Encodes the specified ColorInfo message. Does not implicitly {@link google.cloud.vision.v1p1beta1.ColorInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.color != null && Object.hasOwnProperty.call(message, "color"))
                                $root.google.type.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                            if (message.pixelFraction != null && Object.hasOwnProperty.call(message, "pixelFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.pixelFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ColorInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.ColorInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.ColorInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.color = $root.google.type.Color.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.pixelFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ColorInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ColorInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.color != null && message.hasOwnProperty("color")) {
                                var error = $root.google.type.Color.verify(message.color);
                                if (error)
                                    return "color." + error;
                            }
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                if (typeof message.pixelFraction !== "number")
                                    return "pixelFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a ColorInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.ColorInfo} ColorInfo
                         */
                        ColorInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.ColorInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.ColorInfo();
                            if (object.color != null) {
                                if (typeof object.color !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ColorInfo.color: object expected");
                                message.color = $root.google.type.Color.fromObject(object.color);
                            }
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.pixelFraction != null)
                                message.pixelFraction = Number(object.pixelFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ColorInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ColorInfo} message ColorInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ColorInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.color = null;
                                object.score = 0;
                                object.pixelFraction = 0;
                            }
                            if (message.color != null && message.hasOwnProperty("color"))
                                object.color = $root.google.type.Color.toObject(message.color, options);
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                object.pixelFraction = options.json && !isFinite(message.pixelFraction) ? String(message.pixelFraction) : message.pixelFraction;
                            return object;
                        };
    
                        /**
                         * Converts this ColorInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ColorInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ColorInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.ColorInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ColorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.ColorInfo";
                        };
    
                        return ColorInfo;
                    })();
    
                    v1p1beta1.DominantColorsAnnotation = (function() {
    
                        /**
                         * Properties of a DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IDominantColorsAnnotation
                         * @property {Array.<google.cloud.vision.v1p1beta1.IColorInfo>|null} [colors] DominantColorsAnnotation colors
                         */
    
                        /**
                         * Constructs a new DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a DominantColorsAnnotation.
                         * @implements IDominantColorsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         */
                        function DominantColorsAnnotation(properties) {
                            this.colors = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DominantColorsAnnotation colors.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IColorInfo>} colors
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @instance
                         */
                        DominantColorsAnnotation.prototype.colors = $util.emptyArray;
    
                        /**
                         * Creates a new DominantColorsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.DominantColorsAnnotation} DominantColorsAnnotation instance
                         */
                        DominantColorsAnnotation.create = function create(properties) {
                            return new DominantColorsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.colors != null && message.colors.length)
                                for (var i = 0; i < message.colors.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.ColorInfo.encode(message.colors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.colors && message.colors.length))
                                            message.colors = [];
                                        message.colors.push($root.google.cloud.vision.v1p1beta1.ColorInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DominantColorsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DominantColorsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.colors != null && message.hasOwnProperty("colors")) {
                                if (!Array.isArray(message.colors))
                                    return "colors: array expected";
                                for (var i = 0; i < message.colors.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.ColorInfo.verify(message.colors[i]);
                                    if (error)
                                        return "colors." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a DominantColorsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         */
                        DominantColorsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation();
                            if (object.colors) {
                                if (!Array.isArray(object.colors))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.DominantColorsAnnotation.colors: array expected");
                                message.colors = [];
                                for (var i = 0; i < object.colors.length; ++i) {
                                    if (typeof object.colors[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.DominantColorsAnnotation.colors: object expected");
                                    message.colors[i] = $root.google.cloud.vision.v1p1beta1.ColorInfo.fromObject(object.colors[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DominantColorsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.DominantColorsAnnotation} message DominantColorsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DominantColorsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.colors = [];
                            if (message.colors && message.colors.length) {
                                object.colors = [];
                                for (var j = 0; j < message.colors.length; ++j)
                                    object.colors[j] = $root.google.cloud.vision.v1p1beta1.ColorInfo.toObject(message.colors[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this DominantColorsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DominantColorsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DominantColorsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.DominantColorsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DominantColorsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.DominantColorsAnnotation";
                        };
    
                        return DominantColorsAnnotation;
                    })();
    
                    v1p1beta1.ImageProperties = (function() {
    
                        /**
                         * Properties of an ImageProperties.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IImageProperties
                         * @property {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation|null} [dominantColors] ImageProperties dominantColors
                         */
    
                        /**
                         * Constructs a new ImageProperties.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an ImageProperties.
                         * @implements IImageProperties
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IImageProperties=} [properties] Properties to set
                         */
                        function ImageProperties(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageProperties dominantColors.
                         * @member {google.cloud.vision.v1p1beta1.IDominantColorsAnnotation|null|undefined} dominantColors
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @instance
                         */
                        ImageProperties.prototype.dominantColors = null;
    
                        /**
                         * Creates a new ImageProperties instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageProperties=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.ImageProperties} ImageProperties instance
                         */
                        ImageProperties.create = function create(properties) {
                            return new ImageProperties(properties);
                        };
    
                        /**
                         * Encodes the specified ImageProperties message. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageProperties.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dominantColors != null && Object.hasOwnProperty.call(message, "dominantColors"))
                                $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.encode(message.dominantColors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageProperties message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageProperties.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.ImageProperties();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dominantColors = $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageProperties message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageProperties.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors")) {
                                var error = $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.verify(message.dominantColors);
                                if (error)
                                    return "dominantColors." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageProperties message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.ImageProperties} ImageProperties
                         */
                        ImageProperties.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.ImageProperties)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.ImageProperties();
                            if (object.dominantColors != null) {
                                if (typeof object.dominantColors !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageProperties.dominantColors: object expected");
                                message.dominantColors = $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.fromObject(object.dominantColors);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageProperties message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ImageProperties} message ImageProperties
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageProperties.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.dominantColors = null;
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors"))
                                object.dominantColors = $root.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.toObject(message.dominantColors, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageProperties to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageProperties.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageProperties
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.ImageProperties
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.ImageProperties";
                        };
    
                        return ImageProperties;
                    })();
    
                    v1p1beta1.CropHint = (function() {
    
                        /**
                         * Properties of a CropHint.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ICropHint
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingPoly] CropHint boundingPoly
                         * @property {number|null} [confidence] CropHint confidence
                         * @property {number|null} [importanceFraction] CropHint importanceFraction
                         */
    
                        /**
                         * Constructs a new CropHint.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a CropHint.
                         * @implements ICropHint
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ICropHint=} [properties] Properties to set
                         */
                        function CropHint(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHint boundingPoly.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.boundingPoly = null;
    
                        /**
                         * CropHint confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.confidence = 0;
    
                        /**
                         * CropHint importanceFraction.
                         * @member {number} importanceFraction
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.importanceFraction = 0;
    
                        /**
                         * Creates a new CropHint instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHint=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.CropHint} CropHint instance
                         */
                        CropHint.create = function create(properties) {
                            return new CropHint(properties);
                        };
    
                        /**
                         * Encodes the specified CropHint message. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHint.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            if (message.importanceFraction != null && Object.hasOwnProperty.call(message, "importanceFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.importanceFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHint message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHint.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.CropHint();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.importanceFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHint message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHint.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                if (typeof message.importanceFraction !== "number")
                                    return "importanceFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a CropHint message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.CropHint} CropHint
                         */
                        CropHint.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.CropHint)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.CropHint();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.CropHint.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.importanceFraction != null)
                                message.importanceFraction = Number(object.importanceFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHint message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.CropHint} message CropHint
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHint.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.confidence = 0;
                                object.importanceFraction = 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                object.importanceFraction = options.json && !isFinite(message.importanceFraction) ? String(message.importanceFraction) : message.importanceFraction;
                            return object;
                        };
    
                        /**
                         * Converts this CropHint to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHint.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHint
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.CropHint
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.CropHint";
                        };
    
                        return CropHint;
                    })();
    
                    v1p1beta1.CropHintsAnnotation = (function() {
    
                        /**
                         * Properties of a CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ICropHintsAnnotation
                         * @property {Array.<google.cloud.vision.v1p1beta1.ICropHint>|null} [cropHints] CropHintsAnnotation cropHints
                         */
    
                        /**
                         * Constructs a new CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a CropHintsAnnotation.
                         * @implements ICropHintsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsAnnotation=} [properties] Properties to set
                         */
                        function CropHintsAnnotation(properties) {
                            this.cropHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsAnnotation cropHints.
                         * @member {Array.<google.cloud.vision.v1p1beta1.ICropHint>} cropHints
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @instance
                         */
                        CropHintsAnnotation.prototype.cropHints = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsAnnotation} CropHintsAnnotation instance
                         */
                        CropHintsAnnotation.create = function create(properties) {
                            return new CropHintsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.cropHints != null && message.cropHints.length)
                                for (var i = 0; i < message.cropHints.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.CropHint.encode(message.cropHints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.cropHints && message.cropHints.length))
                                            message.cropHints = [];
                                        message.cropHints.push($root.google.cloud.vision.v1p1beta1.CropHint.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.cropHints != null && message.hasOwnProperty("cropHints")) {
                                if (!Array.isArray(message.cropHints))
                                    return "cropHints: array expected";
                                for (var i = 0; i < message.cropHints.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.CropHint.verify(message.cropHints[i]);
                                    if (error)
                                        return "cropHints." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsAnnotation} CropHintsAnnotation
                         */
                        CropHintsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation();
                            if (object.cropHints) {
                                if (!Array.isArray(object.cropHints))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.CropHintsAnnotation.cropHints: array expected");
                                message.cropHints = [];
                                for (var i = 0; i < object.cropHints.length; ++i) {
                                    if (typeof object.cropHints[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.CropHintsAnnotation.cropHints: object expected");
                                    message.cropHints[i] = $root.google.cloud.vision.v1p1beta1.CropHint.fromObject(object.cropHints[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.CropHintsAnnotation} message CropHintsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.cropHints = [];
                            if (message.cropHints && message.cropHints.length) {
                                object.cropHints = [];
                                for (var j = 0; j < message.cropHints.length; ++j)
                                    object.cropHints[j] = $root.google.cloud.vision.v1p1beta1.CropHint.toObject(message.cropHints[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.CropHintsAnnotation";
                        };
    
                        return CropHintsAnnotation;
                    })();
    
                    v1p1beta1.CropHintsParams = (function() {
    
                        /**
                         * Properties of a CropHintsParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ICropHintsParams
                         * @property {Array.<number>|null} [aspectRatios] CropHintsParams aspectRatios
                         */
    
                        /**
                         * Constructs a new CropHintsParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a CropHintsParams.
                         * @implements ICropHintsParams
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsParams=} [properties] Properties to set
                         */
                        function CropHintsParams(properties) {
                            this.aspectRatios = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsParams aspectRatios.
                         * @member {Array.<number>} aspectRatios
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @instance
                         */
                        CropHintsParams.prototype.aspectRatios = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsParams} CropHintsParams instance
                         */
                        CropHintsParams.create = function create(properties) {
                            return new CropHintsParams(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHintsParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.aspectRatios != null && message.aspectRatios.length) {
                                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    writer.float(message.aspectRatios[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.CropHintsParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.CropHintsParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.aspectRatios && message.aspectRatios.length))
                                            message.aspectRatios = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.aspectRatios.push(reader.float());
                                        } else
                                            message.aspectRatios.push(reader.float());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.aspectRatios != null && message.hasOwnProperty("aspectRatios")) {
                                if (!Array.isArray(message.aspectRatios))
                                    return "aspectRatios: array expected";
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    if (typeof message.aspectRatios[i] !== "number")
                                        return "aspectRatios: number[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.CropHintsParams} CropHintsParams
                         */
                        CropHintsParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.CropHintsParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.CropHintsParams();
                            if (object.aspectRatios) {
                                if (!Array.isArray(object.aspectRatios))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.CropHintsParams.aspectRatios: array expected");
                                message.aspectRatios = [];
                                for (var i = 0; i < object.aspectRatios.length; ++i)
                                    message.aspectRatios[i] = Number(object.aspectRatios[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.CropHintsParams} message CropHintsParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.aspectRatios = [];
                            if (message.aspectRatios && message.aspectRatios.length) {
                                object.aspectRatios = [];
                                for (var j = 0; j < message.aspectRatios.length; ++j)
                                    object.aspectRatios[j] = options.json && !isFinite(message.aspectRatios[j]) ? String(message.aspectRatios[j]) : message.aspectRatios[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.CropHintsParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.CropHintsParams";
                        };
    
                        return CropHintsParams;
                    })();
    
                    v1p1beta1.WebDetectionParams = (function() {
    
                        /**
                         * Properties of a WebDetectionParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IWebDetectionParams
                         * @property {boolean|null} [includeGeoResults] WebDetectionParams includeGeoResults
                         */
    
                        /**
                         * Constructs a new WebDetectionParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a WebDetectionParams.
                         * @implements IWebDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IWebDetectionParams=} [properties] Properties to set
                         */
                        function WebDetectionParams(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetectionParams includeGeoResults.
                         * @member {boolean} includeGeoResults
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @instance
                         */
                        WebDetectionParams.prototype.includeGeoResults = false;
    
                        /**
                         * Creates a new WebDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.WebDetectionParams} WebDetectionParams instance
                         */
                        WebDetectionParams.create = function create(properties) {
                            return new WebDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.includeGeoResults != null && Object.hasOwnProperty.call(message, "includeGeoResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeGeoResults);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.includeGeoResults = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                if (typeof message.includeGeoResults !== "boolean")
                                    return "includeGeoResults: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a WebDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.WebDetectionParams} WebDetectionParams
                         */
                        WebDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.WebDetectionParams();
                            if (object.includeGeoResults != null)
                                message.includeGeoResults = Boolean(object.includeGeoResults);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.WebDetectionParams} message WebDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.includeGeoResults = false;
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                object.includeGeoResults = message.includeGeoResults;
                            return object;
                        };
    
                        /**
                         * Converts this WebDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.WebDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetectionParams";
                        };
    
                        return WebDetectionParams;
                    })();
    
                    v1p1beta1.TextDetectionParams = (function() {
    
                        /**
                         * Properties of a TextDetectionParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ITextDetectionParams
                         * @property {boolean|null} [enableTextDetectionConfidenceScore] TextDetectionParams enableTextDetectionConfidenceScore
                         * @property {Array.<string>|null} [advancedOcrOptions] TextDetectionParams advancedOcrOptions
                         */
    
                        /**
                         * Constructs a new TextDetectionParams.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a TextDetectionParams.
                         * @implements ITextDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ITextDetectionParams=} [properties] Properties to set
                         */
                        function TextDetectionParams(properties) {
                            this.advancedOcrOptions = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextDetectionParams enableTextDetectionConfidenceScore.
                         * @member {boolean} enableTextDetectionConfidenceScore
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.enableTextDetectionConfidenceScore = false;
    
                        /**
                         * TextDetectionParams advancedOcrOptions.
                         * @member {Array.<string>} advancedOcrOptions
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.advancedOcrOptions = $util.emptyArray;
    
                        /**
                         * Creates a new TextDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.TextDetectionParams} TextDetectionParams instance
                         */
                        TextDetectionParams.create = function create(properties) {
                            return new TextDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.enableTextDetectionConfidenceScore != null && Object.hasOwnProperty.call(message, "enableTextDetectionConfidenceScore"))
                                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enableTextDetectionConfidenceScore);
                            if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.advancedOcrOptions[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.TextDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.enableTextDetectionConfidenceScore = reader.bool();
                                        break;
                                    }
                                case 11: {
                                        if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
                                            message.advancedOcrOptions = [];
                                        message.advancedOcrOptions.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                if (typeof message.enableTextDetectionConfidenceScore !== "boolean")
                                    return "enableTextDetectionConfidenceScore: boolean expected";
                            if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
                                if (!Array.isArray(message.advancedOcrOptions))
                                    return "advancedOcrOptions: array expected";
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    if (!$util.isString(message.advancedOcrOptions[i]))
                                        return "advancedOcrOptions: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a TextDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.TextDetectionParams} TextDetectionParams
                         */
                        TextDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.TextDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.TextDetectionParams();
                            if (object.enableTextDetectionConfidenceScore != null)
                                message.enableTextDetectionConfidenceScore = Boolean(object.enableTextDetectionConfidenceScore);
                            if (object.advancedOcrOptions) {
                                if (!Array.isArray(object.advancedOcrOptions))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.TextDetectionParams.advancedOcrOptions: array expected");
                                message.advancedOcrOptions = [];
                                for (var i = 0; i < object.advancedOcrOptions.length; ++i)
                                    message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.TextDetectionParams} message TextDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.advancedOcrOptions = [];
                            if (options.defaults)
                                object.enableTextDetectionConfidenceScore = false;
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                object.enableTextDetectionConfidenceScore = message.enableTextDetectionConfidenceScore;
                            if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
                                object.advancedOcrOptions = [];
                                for (var j = 0; j < message.advancedOcrOptions.length; ++j)
                                    object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this TextDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.TextDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.TextDetectionParams";
                        };
    
                        return TextDetectionParams;
                    })();
    
                    v1p1beta1.ImageContext = (function() {
    
                        /**
                         * Properties of an ImageContext.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IImageContext
                         * @property {google.cloud.vision.v1p1beta1.ILatLongRect|null} [latLongRect] ImageContext latLongRect
                         * @property {Array.<string>|null} [languageHints] ImageContext languageHints
                         * @property {google.cloud.vision.v1p1beta1.ICropHintsParams|null} [cropHintsParams] ImageContext cropHintsParams
                         * @property {google.cloud.vision.v1p1beta1.IWebDetectionParams|null} [webDetectionParams] ImageContext webDetectionParams
                         * @property {google.cloud.vision.v1p1beta1.ITextDetectionParams|null} [textDetectionParams] ImageContext textDetectionParams
                         */
    
                        /**
                         * Constructs a new ImageContext.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an ImageContext.
                         * @implements IImageContext
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IImageContext=} [properties] Properties to set
                         */
                        function ImageContext(properties) {
                            this.languageHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageContext latLongRect.
                         * @member {google.cloud.vision.v1p1beta1.ILatLongRect|null|undefined} latLongRect
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.latLongRect = null;
    
                        /**
                         * ImageContext languageHints.
                         * @member {Array.<string>} languageHints
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.languageHints = $util.emptyArray;
    
                        /**
                         * ImageContext cropHintsParams.
                         * @member {google.cloud.vision.v1p1beta1.ICropHintsParams|null|undefined} cropHintsParams
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.cropHintsParams = null;
    
                        /**
                         * ImageContext webDetectionParams.
                         * @member {google.cloud.vision.v1p1beta1.IWebDetectionParams|null|undefined} webDetectionParams
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.webDetectionParams = null;
    
                        /**
                         * ImageContext textDetectionParams.
                         * @member {google.cloud.vision.v1p1beta1.ITextDetectionParams|null|undefined} textDetectionParams
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.textDetectionParams = null;
    
                        /**
                         * Creates a new ImageContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.ImageContext} ImageContext instance
                         */
                        ImageContext.create = function create(properties) {
                            return new ImageContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageContext message. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLongRect != null && Object.hasOwnProperty.call(message, "latLongRect"))
                                $root.google.cloud.vision.v1p1beta1.LatLongRect.encode(message.latLongRect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.languageHints != null && message.languageHints.length)
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageHints[i]);
                            if (message.cropHintsParams != null && Object.hasOwnProperty.call(message, "cropHintsParams"))
                                $root.google.cloud.vision.v1p1beta1.CropHintsParams.encode(message.cropHintsParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.webDetectionParams != null && Object.hasOwnProperty.call(message, "webDetectionParams"))
                                $root.google.cloud.vision.v1p1beta1.WebDetectionParams.encode(message.webDetectionParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.textDetectionParams != null && Object.hasOwnProperty.call(message, "textDetectionParams"))
                                $root.google.cloud.vision.v1p1beta1.TextDetectionParams.encode(message.textDetectionParams, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.ImageContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.ImageContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLongRect = $root.google.cloud.vision.v1p1beta1.LatLongRect.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.languageHints && message.languageHints.length))
                                            message.languageHints = [];
                                        message.languageHints.push(reader.string());
                                        break;
                                    }
                                case 4: {
                                        message.cropHintsParams = $root.google.cloud.vision.v1p1beta1.CropHintsParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.webDetectionParams = $root.google.cloud.vision.v1p1beta1.WebDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 12: {
                                        message.textDetectionParams = $root.google.cloud.vision.v1p1beta1.TextDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect")) {
                                var error = $root.google.cloud.vision.v1p1beta1.LatLongRect.verify(message.latLongRect);
                                if (error)
                                    return "latLongRect." + error;
                            }
                            if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
                                if (!Array.isArray(message.languageHints))
                                    return "languageHints: array expected";
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    if (!$util.isString(message.languageHints[i]))
                                        return "languageHints: string[] expected";
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams")) {
                                var error = $root.google.cloud.vision.v1p1beta1.CropHintsParams.verify(message.cropHintsParams);
                                if (error)
                                    return "cropHintsParams." + error;
                            }
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p1beta1.WebDetectionParams.verify(message.webDetectionParams);
                                if (error)
                                    return "webDetectionParams." + error;
                            }
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextDetectionParams.verify(message.textDetectionParams);
                                if (error)
                                    return "textDetectionParams." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.ImageContext} ImageContext
                         */
                        ImageContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.ImageContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.ImageContext();
                            if (object.latLongRect != null) {
                                if (typeof object.latLongRect !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageContext.latLongRect: object expected");
                                message.latLongRect = $root.google.cloud.vision.v1p1beta1.LatLongRect.fromObject(object.latLongRect);
                            }
                            if (object.languageHints) {
                                if (!Array.isArray(object.languageHints))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageContext.languageHints: array expected");
                                message.languageHints = [];
                                for (var i = 0; i < object.languageHints.length; ++i)
                                    message.languageHints[i] = String(object.languageHints[i]);
                            }
                            if (object.cropHintsParams != null) {
                                if (typeof object.cropHintsParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageContext.cropHintsParams: object expected");
                                message.cropHintsParams = $root.google.cloud.vision.v1p1beta1.CropHintsParams.fromObject(object.cropHintsParams);
                            }
                            if (object.webDetectionParams != null) {
                                if (typeof object.webDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageContext.webDetectionParams: object expected");
                                message.webDetectionParams = $root.google.cloud.vision.v1p1beta1.WebDetectionParams.fromObject(object.webDetectionParams);
                            }
                            if (object.textDetectionParams != null) {
                                if (typeof object.textDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.ImageContext.textDetectionParams: object expected");
                                message.textDetectionParams = $root.google.cloud.vision.v1p1beta1.TextDetectionParams.fromObject(object.textDetectionParams);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ImageContext} message ImageContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.languageHints = [];
                            if (options.defaults) {
                                object.latLongRect = null;
                                object.cropHintsParams = null;
                                object.webDetectionParams = null;
                                object.textDetectionParams = null;
                            }
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect"))
                                object.latLongRect = $root.google.cloud.vision.v1p1beta1.LatLongRect.toObject(message.latLongRect, options);
                            if (message.languageHints && message.languageHints.length) {
                                object.languageHints = [];
                                for (var j = 0; j < message.languageHints.length; ++j)
                                    object.languageHints[j] = message.languageHints[j];
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams"))
                                object.cropHintsParams = $root.google.cloud.vision.v1p1beta1.CropHintsParams.toObject(message.cropHintsParams, options);
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams"))
                                object.webDetectionParams = $root.google.cloud.vision.v1p1beta1.WebDetectionParams.toObject(message.webDetectionParams, options);
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams"))
                                object.textDetectionParams = $root.google.cloud.vision.v1p1beta1.TextDetectionParams.toObject(message.textDetectionParams, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.ImageContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.ImageContext";
                        };
    
                        return ImageContext;
                    })();
    
                    v1p1beta1.AnnotateImageRequest = (function() {
    
                        /**
                         * Properties of an AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IAnnotateImageRequest
                         * @property {google.cloud.vision.v1p1beta1.IImage|null} [image] AnnotateImageRequest image
                         * @property {Array.<google.cloud.vision.v1p1beta1.IFeature>|null} [features] AnnotateImageRequest features
                         * @property {google.cloud.vision.v1p1beta1.IImageContext|null} [imageContext] AnnotateImageRequest imageContext
                         */
    
                        /**
                         * Constructs a new AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an AnnotateImageRequest.
                         * @implements IAnnotateImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageRequest=} [properties] Properties to set
                         */
                        function AnnotateImageRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageRequest image.
                         * @member {google.cloud.vision.v1p1beta1.IImage|null|undefined} image
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.image = null;
    
                        /**
                         * AnnotateImageRequest features.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateImageRequest imageContext.
                         * @member {google.cloud.vision.v1p1beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.imageContext = null;
    
                        /**
                         * Creates a new AnnotateImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageRequest} AnnotateImageRequest instance
                         */
                        AnnotateImageRequest.create = function create(properties) {
                            return new AnnotateImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message. Does not implicitly {@link google.cloud.vision.v1p1beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                $root.google.cloud.vision.v1p1beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p1beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.image = $root.google.cloud.vision.v1p1beta1.Image.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p1beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p1beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.image != null && message.hasOwnProperty("image")) {
                                var error = $root.google.cloud.vision.v1p1beta1.Image.verify(message.image);
                                if (error)
                                    return "image." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p1beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageRequest} AnnotateImageRequest
                         */
                        AnnotateImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest();
                            if (object.image != null) {
                                if (typeof object.image !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageRequest.image: object expected");
                                message.image = $root.google.cloud.vision.v1p1beta1.Image.fromObject(object.image);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p1beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p1beta1.ImageContext.fromObject(object.imageContext);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.AnnotateImageRequest} message AnnotateImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.image = null;
                                object.imageContext = null;
                            }
                            if (message.image != null && message.hasOwnProperty("image"))
                                object.image = $root.google.cloud.vision.v1p1beta1.Image.toObject(message.image, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p1beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p1beta1.ImageContext.toObject(message.imageContext, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.AnnotateImageRequest";
                        };
    
                        return AnnotateImageRequest;
                    })();
    
                    v1p1beta1.AnnotateImageResponse = (function() {
    
                        /**
                         * Properties of an AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IAnnotateImageResponse
                         * @property {Array.<google.cloud.vision.v1p1beta1.IFaceAnnotation>|null} [faceAnnotations] AnnotateImageResponse faceAnnotations
                         * @property {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>|null} [landmarkAnnotations] AnnotateImageResponse landmarkAnnotations
                         * @property {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>|null} [logoAnnotations] AnnotateImageResponse logoAnnotations
                         * @property {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>|null} [labelAnnotations] AnnotateImageResponse labelAnnotations
                         * @property {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>|null} [textAnnotations] AnnotateImageResponse textAnnotations
                         * @property {google.cloud.vision.v1p1beta1.ITextAnnotation|null} [fullTextAnnotation] AnnotateImageResponse fullTextAnnotation
                         * @property {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation|null} [safeSearchAnnotation] AnnotateImageResponse safeSearchAnnotation
                         * @property {google.cloud.vision.v1p1beta1.IImageProperties|null} [imagePropertiesAnnotation] AnnotateImageResponse imagePropertiesAnnotation
                         * @property {google.cloud.vision.v1p1beta1.ICropHintsAnnotation|null} [cropHintsAnnotation] AnnotateImageResponse cropHintsAnnotation
                         * @property {google.cloud.vision.v1p1beta1.IWebDetection|null} [webDetection] AnnotateImageResponse webDetection
                         * @property {google.rpc.IStatus|null} [error] AnnotateImageResponse error
                         */
    
                        /**
                         * Constructs a new AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents an AnnotateImageResponse.
                         * @implements IAnnotateImageResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageResponse=} [properties] Properties to set
                         */
                        function AnnotateImageResponse(properties) {
                            this.faceAnnotations = [];
                            this.landmarkAnnotations = [];
                            this.logoAnnotations = [];
                            this.labelAnnotations = [];
                            this.textAnnotations = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageResponse faceAnnotations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IFaceAnnotation>} faceAnnotations
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.faceAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse landmarkAnnotations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>} landmarkAnnotations
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.landmarkAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse logoAnnotations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>} logoAnnotations
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.logoAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse labelAnnotations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>} labelAnnotations
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.labelAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse textAnnotations.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IEntityAnnotation>} textAnnotations
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.textAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse fullTextAnnotation.
                         * @member {google.cloud.vision.v1p1beta1.ITextAnnotation|null|undefined} fullTextAnnotation
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.fullTextAnnotation = null;
    
                        /**
                         * AnnotateImageResponse safeSearchAnnotation.
                         * @member {google.cloud.vision.v1p1beta1.ISafeSearchAnnotation|null|undefined} safeSearchAnnotation
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.safeSearchAnnotation = null;
    
                        /**
                         * AnnotateImageResponse imagePropertiesAnnotation.
                         * @member {google.cloud.vision.v1p1beta1.IImageProperties|null|undefined} imagePropertiesAnnotation
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.imagePropertiesAnnotation = null;
    
                        /**
                         * AnnotateImageResponse cropHintsAnnotation.
                         * @member {google.cloud.vision.v1p1beta1.ICropHintsAnnotation|null|undefined} cropHintsAnnotation
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.cropHintsAnnotation = null;
    
                        /**
                         * AnnotateImageResponse webDetection.
                         * @member {google.cloud.vision.v1p1beta1.IWebDetection|null|undefined} webDetection
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.webDetection = null;
    
                        /**
                         * AnnotateImageResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.error = null;
    
                        /**
                         * Creates a new AnnotateImageResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageResponse} AnnotateImageResponse instance
                         */
                        AnnotateImageResponse.create = function create(properties) {
                            return new AnnotateImageResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message. Does not implicitly {@link google.cloud.vision.v1p1beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.faceAnnotations != null && message.faceAnnotations.length)
                                for (var i = 0; i < message.faceAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.FaceAnnotation.encode(message.faceAnnotations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.landmarkAnnotations != null && message.landmarkAnnotations.length)
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.EntityAnnotation.encode(message.landmarkAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.logoAnnotations != null && message.logoAnnotations.length)
                                for (var i = 0; i < message.logoAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.EntityAnnotation.encode(message.logoAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.labelAnnotations != null && message.labelAnnotations.length)
                                for (var i = 0; i < message.labelAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.EntityAnnotation.encode(message.labelAnnotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.textAnnotations != null && message.textAnnotations.length)
                                for (var i = 0; i < message.textAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.EntityAnnotation.encode(message.textAnnotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.safeSearchAnnotation != null && Object.hasOwnProperty.call(message, "safeSearchAnnotation"))
                                $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.encode(message.safeSearchAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.imagePropertiesAnnotation != null && Object.hasOwnProperty.call(message, "imagePropertiesAnnotation"))
                                $root.google.cloud.vision.v1p1beta1.ImageProperties.encode(message.imagePropertiesAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            if (message.cropHintsAnnotation != null && Object.hasOwnProperty.call(message, "cropHintsAnnotation"))
                                $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation.encode(message.cropHintsAnnotation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                            if (message.fullTextAnnotation != null && Object.hasOwnProperty.call(message, "fullTextAnnotation"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.encode(message.fullTextAnnotation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            if (message.webDetection != null && Object.hasOwnProperty.call(message, "webDetection"))
                                $root.google.cloud.vision.v1p1beta1.WebDetection.encode(message.webDetection, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.faceAnnotations && message.faceAnnotations.length))
                                            message.faceAnnotations = [];
                                        message.faceAnnotations.push($root.google.cloud.vision.v1p1beta1.FaceAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.landmarkAnnotations && message.landmarkAnnotations.length))
                                            message.landmarkAnnotations = [];
                                        message.landmarkAnnotations.push($root.google.cloud.vision.v1p1beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.logoAnnotations && message.logoAnnotations.length))
                                            message.logoAnnotations = [];
                                        message.logoAnnotations.push($root.google.cloud.vision.v1p1beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.labelAnnotations && message.labelAnnotations.length))
                                            message.labelAnnotations = [];
                                        message.labelAnnotations.push($root.google.cloud.vision.v1p1beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        if (!(message.textAnnotations && message.textAnnotations.length))
                                            message.textAnnotations = [];
                                        message.textAnnotations.push($root.google.cloud.vision.v1p1beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 12: {
                                        message.fullTextAnnotation = $root.google.cloud.vision.v1p1beta1.TextAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.safeSearchAnnotation = $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p1beta1.ImageProperties.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 11: {
                                        message.cropHintsAnnotation = $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 13: {
                                        message.webDetection = $root.google.cloud.vision.v1p1beta1.WebDetection.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 9: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.faceAnnotations != null && message.hasOwnProperty("faceAnnotations")) {
                                if (!Array.isArray(message.faceAnnotations))
                                    return "faceAnnotations: array expected";
                                for (var i = 0; i < message.faceAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.verify(message.faceAnnotations[i]);
                                    if (error)
                                        return "faceAnnotations." + error;
                                }
                            }
                            if (message.landmarkAnnotations != null && message.hasOwnProperty("landmarkAnnotations")) {
                                if (!Array.isArray(message.landmarkAnnotations))
                                    return "landmarkAnnotations: array expected";
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.verify(message.landmarkAnnotations[i]);
                                    if (error)
                                        return "landmarkAnnotations." + error;
                                }
                            }
                            if (message.logoAnnotations != null && message.hasOwnProperty("logoAnnotations")) {
                                if (!Array.isArray(message.logoAnnotations))
                                    return "logoAnnotations: array expected";
                                for (var i = 0; i < message.logoAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.verify(message.logoAnnotations[i]);
                                    if (error)
                                        return "logoAnnotations." + error;
                                }
                            }
                            if (message.labelAnnotations != null && message.hasOwnProperty("labelAnnotations")) {
                                if (!Array.isArray(message.labelAnnotations))
                                    return "labelAnnotations: array expected";
                                for (var i = 0; i < message.labelAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.verify(message.labelAnnotations[i]);
                                    if (error)
                                        return "labelAnnotations." + error;
                                }
                            }
                            if (message.textAnnotations != null && message.hasOwnProperty("textAnnotations")) {
                                if (!Array.isArray(message.textAnnotations))
                                    return "textAnnotations: array expected";
                                for (var i = 0; i < message.textAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.verify(message.textAnnotations[i]);
                                    if (error)
                                        return "textAnnotations." + error;
                                }
                            }
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.verify(message.fullTextAnnotation);
                                if (error)
                                    return "fullTextAnnotation." + error;
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation")) {
                                var error = $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.verify(message.safeSearchAnnotation);
                                if (error)
                                    return "safeSearchAnnotation." + error;
                            }
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation")) {
                                var error = $root.google.cloud.vision.v1p1beta1.ImageProperties.verify(message.imagePropertiesAnnotation);
                                if (error)
                                    return "imagePropertiesAnnotation." + error;
                            }
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation")) {
                                var error = $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation.verify(message.cropHintsAnnotation);
                                if (error)
                                    return "cropHintsAnnotation." + error;
                            }
                            if (message.webDetection != null && message.hasOwnProperty("webDetection")) {
                                var error = $root.google.cloud.vision.v1p1beta1.WebDetection.verify(message.webDetection);
                                if (error)
                                    return "webDetection." + error;
                            }
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.AnnotateImageResponse} AnnotateImageResponse
                         */
                        AnnotateImageResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse();
                            if (object.faceAnnotations) {
                                if (!Array.isArray(object.faceAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.faceAnnotations: array expected");
                                message.faceAnnotations = [];
                                for (var i = 0; i < object.faceAnnotations.length; ++i) {
                                    if (typeof object.faceAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.faceAnnotations: object expected");
                                    message.faceAnnotations[i] = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.fromObject(object.faceAnnotations[i]);
                                }
                            }
                            if (object.landmarkAnnotations) {
                                if (!Array.isArray(object.landmarkAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.landmarkAnnotations: array expected");
                                message.landmarkAnnotations = [];
                                for (var i = 0; i < object.landmarkAnnotations.length; ++i) {
                                    if (typeof object.landmarkAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.landmarkAnnotations: object expected");
                                    message.landmarkAnnotations[i] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.fromObject(object.landmarkAnnotations[i]);
                                }
                            }
                            if (object.logoAnnotations) {
                                if (!Array.isArray(object.logoAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.logoAnnotations: array expected");
                                message.logoAnnotations = [];
                                for (var i = 0; i < object.logoAnnotations.length; ++i) {
                                    if (typeof object.logoAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.logoAnnotations: object expected");
                                    message.logoAnnotations[i] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.fromObject(object.logoAnnotations[i]);
                                }
                            }
                            if (object.labelAnnotations) {
                                if (!Array.isArray(object.labelAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.labelAnnotations: array expected");
                                message.labelAnnotations = [];
                                for (var i = 0; i < object.labelAnnotations.length; ++i) {
                                    if (typeof object.labelAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.labelAnnotations: object expected");
                                    message.labelAnnotations[i] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.fromObject(object.labelAnnotations[i]);
                                }
                            }
                            if (object.textAnnotations) {
                                if (!Array.isArray(object.textAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.textAnnotations: array expected");
                                message.textAnnotations = [];
                                for (var i = 0; i < object.textAnnotations.length; ++i) {
                                    if (typeof object.textAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.textAnnotations: object expected");
                                    message.textAnnotations[i] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.fromObject(object.textAnnotations[i]);
                                }
                            }
                            if (object.fullTextAnnotation != null) {
                                if (typeof object.fullTextAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.fullTextAnnotation: object expected");
                                message.fullTextAnnotation = $root.google.cloud.vision.v1p1beta1.TextAnnotation.fromObject(object.fullTextAnnotation);
                            }
                            if (object.safeSearchAnnotation != null) {
                                if (typeof object.safeSearchAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.safeSearchAnnotation: object expected");
                                message.safeSearchAnnotation = $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.fromObject(object.safeSearchAnnotation);
                            }
                            if (object.imagePropertiesAnnotation != null) {
                                if (typeof object.imagePropertiesAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.imagePropertiesAnnotation: object expected");
                                message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p1beta1.ImageProperties.fromObject(object.imagePropertiesAnnotation);
                            }
                            if (object.cropHintsAnnotation != null) {
                                if (typeof object.cropHintsAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.cropHintsAnnotation: object expected");
                                message.cropHintsAnnotation = $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation.fromObject(object.cropHintsAnnotation);
                            }
                            if (object.webDetection != null) {
                                if (typeof object.webDetection !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.webDetection: object expected");
                                message.webDetection = $root.google.cloud.vision.v1p1beta1.WebDetection.fromObject(object.webDetection);
                            }
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.AnnotateImageResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.AnnotateImageResponse} message AnnotateImageResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.faceAnnotations = [];
                                object.landmarkAnnotations = [];
                                object.logoAnnotations = [];
                                object.labelAnnotations = [];
                                object.textAnnotations = [];
                            }
                            if (options.defaults) {
                                object.safeSearchAnnotation = null;
                                object.imagePropertiesAnnotation = null;
                                object.error = null;
                                object.cropHintsAnnotation = null;
                                object.fullTextAnnotation = null;
                                object.webDetection = null;
                            }
                            if (message.faceAnnotations && message.faceAnnotations.length) {
                                object.faceAnnotations = [];
                                for (var j = 0; j < message.faceAnnotations.length; ++j)
                                    object.faceAnnotations[j] = $root.google.cloud.vision.v1p1beta1.FaceAnnotation.toObject(message.faceAnnotations[j], options);
                            }
                            if (message.landmarkAnnotations && message.landmarkAnnotations.length) {
                                object.landmarkAnnotations = [];
                                for (var j = 0; j < message.landmarkAnnotations.length; ++j)
                                    object.landmarkAnnotations[j] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.toObject(message.landmarkAnnotations[j], options);
                            }
                            if (message.logoAnnotations && message.logoAnnotations.length) {
                                object.logoAnnotations = [];
                                for (var j = 0; j < message.logoAnnotations.length; ++j)
                                    object.logoAnnotations[j] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.toObject(message.logoAnnotations[j], options);
                            }
                            if (message.labelAnnotations && message.labelAnnotations.length) {
                                object.labelAnnotations = [];
                                for (var j = 0; j < message.labelAnnotations.length; ++j)
                                    object.labelAnnotations[j] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.toObject(message.labelAnnotations[j], options);
                            }
                            if (message.textAnnotations && message.textAnnotations.length) {
                                object.textAnnotations = [];
                                for (var j = 0; j < message.textAnnotations.length; ++j)
                                    object.textAnnotations[j] = $root.google.cloud.vision.v1p1beta1.EntityAnnotation.toObject(message.textAnnotations[j], options);
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation"))
                                object.safeSearchAnnotation = $root.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.toObject(message.safeSearchAnnotation, options);
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation"))
                                object.imagePropertiesAnnotation = $root.google.cloud.vision.v1p1beta1.ImageProperties.toObject(message.imagePropertiesAnnotation, options);
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation"))
                                object.cropHintsAnnotation = $root.google.cloud.vision.v1p1beta1.CropHintsAnnotation.toObject(message.cropHintsAnnotation, options);
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation"))
                                object.fullTextAnnotation = $root.google.cloud.vision.v1p1beta1.TextAnnotation.toObject(message.fullTextAnnotation, options);
                            if (message.webDetection != null && message.hasOwnProperty("webDetection"))
                                object.webDetection = $root.google.cloud.vision.v1p1beta1.WebDetection.toObject(message.webDetection, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.AnnotateImageResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.AnnotateImageResponse";
                        };
    
                        return AnnotateImageResponse;
                    })();
    
                    v1p1beta1.BatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1p1beta1.IAnnotateImageRequest>|null} [requests] BatchAnnotateImagesRequest requests
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a BatchAnnotateImagesRequest.
                         * @implements IBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest instance
                         */
                        BatchAnnotateImagesRequest.create = function create(properties) {
                            return new BatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p1beta1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         */
                        BatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest} message BatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p1beta1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest";
                        };
    
                        return BatchAnnotateImagesRequest;
                    })();
    
                    v1p1beta1.BatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IBatchAnnotateImagesResponse
                         * @property {Array.<google.cloud.vision.v1p1beta1.IAnnotateImageResponse>|null} [responses] BatchAnnotateImagesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a BatchAnnotateImagesResponse.
                         * @implements IBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @instance
                         */
                        BatchAnnotateImagesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse instance
                         */
                        BatchAnnotateImagesResponse.create = function create(properties) {
                            return new BatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p1beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         */
                        BatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse} message BatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p1beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse";
                        };
    
                        return BatchAnnotateImagesResponse;
                    })();
    
                    /**
                     * Likelihood enum.
                     * @name google.cloud.vision.v1p1beta1.Likelihood
                     * @enum {number}
                     * @property {number} UNKNOWN=0 UNKNOWN value
                     * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value
                     * @property {number} UNLIKELY=2 UNLIKELY value
                     * @property {number} POSSIBLE=3 POSSIBLE value
                     * @property {number} LIKELY=4 LIKELY value
                     * @property {number} VERY_LIKELY=5 VERY_LIKELY value
                     */
                    v1p1beta1.Likelihood = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNKNOWN"] = 0;
                        values[valuesById[1] = "VERY_UNLIKELY"] = 1;
                        values[valuesById[2] = "UNLIKELY"] = 2;
                        values[valuesById[3] = "POSSIBLE"] = 3;
                        values[valuesById[4] = "LIKELY"] = 4;
                        values[valuesById[5] = "VERY_LIKELY"] = 5;
                        return values;
                    })();
    
                    v1p1beta1.TextAnnotation = (function() {
    
                        /**
                         * Properties of a TextAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ITextAnnotation
                         * @property {Array.<google.cloud.vision.v1p1beta1.IPage>|null} [pages] TextAnnotation pages
                         * @property {string|null} [text] TextAnnotation text
                         */
    
                        /**
                         * Constructs a new TextAnnotation.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a TextAnnotation.
                         * @implements ITextAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ITextAnnotation=} [properties] Properties to set
                         */
                        function TextAnnotation(properties) {
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextAnnotation pages.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IPage>} pages
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.pages = $util.emptyArray;
    
                        /**
                         * TextAnnotation text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.text = "";
    
                        /**
                         * Creates a new TextAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.TextAnnotation} TextAnnotation instance
                         */
                        TextAnnotation.create = function create(properties) {
                            return new TextAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.pages != null && message.pages.length)
                                for (var i = 0; i < message.pages.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        message.pages.push($root.google.cloud.vision.v1p1beta1.Page.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.text = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Page.verify(message.pages[i]);
                                    if (error)
                                        return "pages." + error;
                                }
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a TextAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.TextAnnotation} TextAnnotation
                         */
                        TextAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.TextAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation();
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.TextAnnotation.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i) {
                                    if (typeof object.pages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.TextAnnotation.pages: object expected");
                                    message.pages[i] = $root.google.cloud.vision.v1p1beta1.Page.fromObject(object.pages[i]);
                                }
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.TextAnnotation} message TextAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.pages = [];
                            if (options.defaults)
                                object.text = "";
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = $root.google.cloud.vision.v1p1beta1.Page.toObject(message.pages[j], options);
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            return object;
                        };
    
                        /**
                         * Converts this TextAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.TextAnnotation";
                        };
    
                        TextAnnotation.DetectedLanguage = (function() {
    
                            /**
                             * Properties of a DetectedLanguage.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @interface IDetectedLanguage
                             * @property {string|null} [languageCode] DetectedLanguage languageCode
                             * @property {number|null} [confidence] DetectedLanguage confidence
                             */
    
                            /**
                             * Constructs a new DetectedLanguage.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @classdesc Represents a DetectedLanguage.
                             * @implements IDetectedLanguage
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             */
                            function DetectedLanguage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedLanguage languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.languageCode = "";
    
                            /**
                             * DetectedLanguage confidence.
                             * @member {number} confidence
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.confidence = 0;
    
                            /**
                             * Creates a new DetectedLanguage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} DetectedLanguage instance
                             */
                            DetectedLanguage.create = function create(properties) {
                                return new DetectedLanguage(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
                                if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.confidence = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedLanguage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedLanguage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    if (typeof message.confidence !== "number")
                                        return "confidence: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             */
                            DetectedLanguage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage();
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.confidence != null)
                                    message.confidence = Number(object.confidence);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage} message DetectedLanguage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedLanguage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.languageCode = "";
                                    object.confidence = 0;
                                }
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedLanguage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedLanguage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedLanguage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage";
                            };
    
                            return DetectedLanguage;
                        })();
    
                        TextAnnotation.DetectedBreak = (function() {
    
                            /**
                             * Properties of a DetectedBreak.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @interface IDetectedBreak
                             * @property {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType|null} [type] DetectedBreak type
                             * @property {boolean|null} [isPrefix] DetectedBreak isPrefix
                             */
    
                            /**
                             * Constructs a new DetectedBreak.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @classdesc Represents a DetectedBreak.
                             * @implements IDetectedBreak
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             */
                            function DetectedBreak(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedBreak type.
                             * @member {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType} type
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.type = 0;
    
                            /**
                             * DetectedBreak isPrefix.
                             * @member {boolean} isPrefix
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.isPrefix = false;
    
                            /**
                             * Creates a new DetectedBreak instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} DetectedBreak instance
                             */
                            DetectedBreak.create = function create(properties) {
                                return new DetectedBreak(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                                if (message.isPrefix != null && Object.hasOwnProperty.call(message, "isPrefix"))
                                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isPrefix);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 2: {
                                            message.isPrefix = reader.bool();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedBreak message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedBreak.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                        break;
                                    }
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    if (typeof message.isPrefix !== "boolean")
                                        return "isPrefix: boolean expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             */
                            DetectedBreak.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "SPACE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "SURE_SPACE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "EOL_SURE_SPACE":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "HYPHEN":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LINE_BREAK":
                                case 5:
                                    message.type = 5;
                                    break;
                                }
                                if (object.isPrefix != null)
                                    message.isPrefix = Boolean(object.isPrefix);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak} message DetectedBreak
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedBreak.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN" : 0;
                                    object.isPrefix = false;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type;
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    object.isPrefix = message.isPrefix;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedBreak to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedBreak.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedBreak
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak";
                            };
    
                            /**
                             * BreakType enum.
                             * @name google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.BreakType
                             * @enum {number}
                             * @property {number} UNKNOWN=0 UNKNOWN value
                             * @property {number} SPACE=1 SPACE value
                             * @property {number} SURE_SPACE=2 SURE_SPACE value
                             * @property {number} EOL_SURE_SPACE=3 EOL_SURE_SPACE value
                             * @property {number} HYPHEN=4 HYPHEN value
                             * @property {number} LINE_BREAK=5 LINE_BREAK value
                             */
                            DetectedBreak.BreakType = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN"] = 0;
                                values[valuesById[1] = "SPACE"] = 1;
                                values[valuesById[2] = "SURE_SPACE"] = 2;
                                values[valuesById[3] = "EOL_SURE_SPACE"] = 3;
                                values[valuesById[4] = "HYPHEN"] = 4;
                                values[valuesById[5] = "LINE_BREAK"] = 5;
                                return values;
                            })();
    
                            return DetectedBreak;
                        })();
    
                        TextAnnotation.TextProperty = (function() {
    
                            /**
                             * Properties of a TextProperty.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @interface ITextProperty
                             * @property {Array.<google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage>|null} [detectedLanguages] TextProperty detectedLanguages
                             * @property {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak|null} [detectedBreak] TextProperty detectedBreak
                             */
    
                            /**
                             * Constructs a new TextProperty.
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation
                             * @classdesc Represents a TextProperty.
                             * @implements ITextProperty
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             */
                            function TextProperty(properties) {
                                this.detectedLanguages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * TextProperty detectedLanguages.
                             * @member {Array.<google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedLanguage>} detectedLanguages
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedLanguages = $util.emptyArray;
    
                            /**
                             * TextProperty detectedBreak.
                             * @member {google.cloud.vision.v1p1beta1.TextAnnotation.IDetectedBreak|null|undefined} detectedBreak
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedBreak = null;
    
                            /**
                             * Creates a new TextProperty instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} TextProperty instance
                             */
                            TextProperty.create = function create(properties) {
                                return new TextProperty(properties);
                            };
    
                            /**
                             * Encodes the specified TextProperty message. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.detectedLanguages != null && message.detectedLanguages.length)
                                    for (var i = 0; i < message.detectedLanguages.length; ++i)
                                        $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
                                    $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified TextProperty message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            if (!(message.detectedLanguages && message.detectedLanguages.length))
                                                message.detectedLanguages = [];
                                            message.detectedLanguages.push($root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 2: {
                                            message.detectedBreak = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a TextProperty message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            TextProperty.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
                                    if (!Array.isArray(message.detectedLanguages))
                                        return "detectedLanguages: array expected";
                                    for (var i = 0; i < message.detectedLanguages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.verify(message.detectedLanguages[i]);
                                        if (error)
                                            return "detectedLanguages." + error;
                                    }
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
                                    var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.verify(message.detectedBreak);
                                    if (error)
                                        return "detectedBreak." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a TextProperty message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} TextProperty
                             */
                            TextProperty.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty();
                                if (object.detectedLanguages) {
                                    if (!Array.isArray(object.detectedLanguages))
                                        throw TypeError(".google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.detectedLanguages: array expected");
                                    message.detectedLanguages = [];
                                    for (var i = 0; i < object.detectedLanguages.length; ++i) {
                                        if (typeof object.detectedLanguages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.detectedLanguages: object expected");
                                        message.detectedLanguages[i] = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.fromObject(object.detectedLanguages[i]);
                                    }
                                }
                                if (object.detectedBreak != null) {
                                    if (typeof object.detectedBreak !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.detectedBreak: object expected");
                                    message.detectedBreak = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.fromObject(object.detectedBreak);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a TextProperty message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty} message TextProperty
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            TextProperty.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults)
                                    object.detectedLanguages = [];
                                if (options.defaults)
                                    object.detectedBreak = null;
                                if (message.detectedLanguages && message.detectedLanguages.length) {
                                    object.detectedLanguages = [];
                                    for (var j = 0; j < message.detectedLanguages.length; ++j)
                                        object.detectedLanguages[j] = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.toObject(message.detectedLanguages[j], options);
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
                                    object.detectedBreak = $root.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.toObject(message.detectedBreak, options);
                                return object;
                            };
    
                            /**
                             * Converts this TextProperty to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            TextProperty.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for TextProperty
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            TextProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty";
                            };
    
                            return TextProperty;
                        })();
    
                        return TextAnnotation;
                    })();
    
                    v1p1beta1.Page = (function() {
    
                        /**
                         * Properties of a Page.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IPage
                         * @property {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null} [property] Page property
                         * @property {number|null} [width] Page width
                         * @property {number|null} [height] Page height
                         * @property {Array.<google.cloud.vision.v1p1beta1.IBlock>|null} [blocks] Page blocks
                         * @property {number|null} [confidence] Page confidence
                         */
    
                        /**
                         * Constructs a new Page.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Page.
                         * @implements IPage
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IPage=} [properties] Properties to set
                         */
                        function Page(properties) {
                            this.blocks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Page property.
                         * @member {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         */
                        Page.prototype.property = null;
    
                        /**
                         * Page width.
                         * @member {number} width
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         */
                        Page.prototype.width = 0;
    
                        /**
                         * Page height.
                         * @member {number} height
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         */
                        Page.prototype.height = 0;
    
                        /**
                         * Page blocks.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IBlock>} blocks
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         */
                        Page.prototype.blocks = $util.emptyArray;
    
                        /**
                         * Page confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         */
                        Page.prototype.confidence = 0;
    
                        /**
                         * Creates a new Page instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Page} Page instance
                         */
                        Page.create = function create(properties) {
                            return new Page(properties);
                        };
    
                        /**
                         * Encodes the specified Page message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Page.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.width);
                            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height);
                            if (message.blocks != null && message.blocks.length)
                                for (var i = 0; i < message.blocks.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Block.encode(message.blocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Page.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Page();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.width = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.height = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        if (!(message.blocks && message.blocks.length))
                                            message.blocks = [];
                                        message.blocks.push($root.google.cloud.vision.v1p1beta1.Block.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Page message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Page.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.width != null && message.hasOwnProperty("width"))
                                if (!$util.isInteger(message.width))
                                    return "width: integer expected";
                            if (message.height != null && message.hasOwnProperty("height"))
                                if (!$util.isInteger(message.height))
                                    return "height: integer expected";
                            if (message.blocks != null && message.hasOwnProperty("blocks")) {
                                if (!Array.isArray(message.blocks))
                                    return "blocks: array expected";
                                for (var i = 0; i < message.blocks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Block.verify(message.blocks[i]);
                                    if (error)
                                        return "blocks." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Page message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Page} Page
                         */
                        Page.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Page)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Page();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Page.property: object expected");
                                message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.width != null)
                                message.width = object.width | 0;
                            if (object.height != null)
                                message.height = object.height | 0;
                            if (object.blocks) {
                                if (!Array.isArray(object.blocks))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Page.blocks: array expected");
                                message.blocks = [];
                                for (var i = 0; i < object.blocks.length; ++i) {
                                    if (typeof object.blocks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.Page.blocks: object expected");
                                    message.blocks[i] = $root.google.cloud.vision.v1p1beta1.Block.fromObject(object.blocks[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Page message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Page} message Page
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Page.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.blocks = [];
                            if (options.defaults) {
                                object.property = null;
                                object.width = 0;
                                object.height = 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.width != null && message.hasOwnProperty("width"))
                                object.width = message.width;
                            if (message.height != null && message.hasOwnProperty("height"))
                                object.height = message.height;
                            if (message.blocks && message.blocks.length) {
                                object.blocks = [];
                                for (var j = 0; j < message.blocks.length; ++j)
                                    object.blocks[j] = $root.google.cloud.vision.v1p1beta1.Block.toObject(message.blocks[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Page to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Page.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Page
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Page
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Page";
                        };
    
                        return Page;
                    })();
    
                    v1p1beta1.Block = (function() {
    
                        /**
                         * Properties of a Block.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IBlock
                         * @property {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null} [property] Block property
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingBox] Block boundingBox
                         * @property {Array.<google.cloud.vision.v1p1beta1.IParagraph>|null} [paragraphs] Block paragraphs
                         * @property {google.cloud.vision.v1p1beta1.Block.BlockType|null} [blockType] Block blockType
                         * @property {number|null} [confidence] Block confidence
                         */
    
                        /**
                         * Constructs a new Block.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Block.
                         * @implements IBlock
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IBlock=} [properties] Properties to set
                         */
                        function Block(properties) {
                            this.paragraphs = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Block property.
                         * @member {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         */
                        Block.prototype.property = null;
    
                        /**
                         * Block boundingBox.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         */
                        Block.prototype.boundingBox = null;
    
                        /**
                         * Block paragraphs.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IParagraph>} paragraphs
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         */
                        Block.prototype.paragraphs = $util.emptyArray;
    
                        /**
                         * Block blockType.
                         * @member {google.cloud.vision.v1p1beta1.Block.BlockType} blockType
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         */
                        Block.prototype.blockType = 0;
    
                        /**
                         * Block confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         */
                        Block.prototype.confidence = 0;
    
                        /**
                         * Creates a new Block instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBlock=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Block} Block instance
                         */
                        Block.create = function create(properties) {
                            return new Block(properties);
                        };
    
                        /**
                         * Encodes the specified Block message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Block.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.paragraphs != null && message.paragraphs.length)
                                for (var i = 0; i < message.paragraphs.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.blockType != null && Object.hasOwnProperty.call(message, "blockType"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.blockType);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Block.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Block();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.paragraphs && message.paragraphs.length))
                                            message.paragraphs = [];
                                        message.paragraphs.push($root.google.cloud.vision.v1p1beta1.Paragraph.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.blockType = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Block message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Block.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
                                if (!Array.isArray(message.paragraphs))
                                    return "paragraphs: array expected";
                                for (var i = 0; i < message.paragraphs.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Paragraph.verify(message.paragraphs[i]);
                                    if (error)
                                        return "paragraphs." + error;
                                }
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                switch (message.blockType) {
                                default:
                                    return "blockType: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Block message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Block} Block
                         */
                        Block.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Block)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Block();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Block.property: object expected");
                                message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Block.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.paragraphs) {
                                if (!Array.isArray(object.paragraphs))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Block.paragraphs: array expected");
                                message.paragraphs = [];
                                for (var i = 0; i < object.paragraphs.length; ++i) {
                                    if (typeof object.paragraphs[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.Block.paragraphs: object expected");
                                    message.paragraphs[i] = $root.google.cloud.vision.v1p1beta1.Paragraph.fromObject(object.paragraphs[i]);
                                }
                            }
                            switch (object.blockType) {
                            default:
                                if (typeof object.blockType === "number") {
                                    message.blockType = object.blockType;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blockType = 0;
                                break;
                            case "TEXT":
                            case 1:
                                message.blockType = 1;
                                break;
                            case "TABLE":
                            case 2:
                                message.blockType = 2;
                                break;
                            case "PICTURE":
                            case 3:
                                message.blockType = 3;
                                break;
                            case "RULER":
                            case 4:
                                message.blockType = 4;
                                break;
                            case "BARCODE":
                            case 5:
                                message.blockType = 5;
                                break;
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Block message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Block} message Block
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Block.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.paragraphs = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.blockType = options.enums === String ? "UNKNOWN" : 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.paragraphs && message.paragraphs.length) {
                                object.paragraphs = [];
                                for (var j = 0; j < message.paragraphs.length; ++j)
                                    object.paragraphs[j] = $root.google.cloud.vision.v1p1beta1.Paragraph.toObject(message.paragraphs[j], options);
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                object.blockType = options.enums === String ? $root.google.cloud.vision.v1p1beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p1beta1.Block.BlockType[message.blockType] : message.blockType;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Block to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Block.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Block
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Block
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Block";
                        };
    
                        /**
                         * BlockType enum.
                         * @name google.cloud.vision.v1p1beta1.Block.BlockType
                         * @enum {number}
                         * @property {number} UNKNOWN=0 UNKNOWN value
                         * @property {number} TEXT=1 TEXT value
                         * @property {number} TABLE=2 TABLE value
                         * @property {number} PICTURE=3 PICTURE value
                         * @property {number} RULER=4 RULER value
                         * @property {number} BARCODE=5 BARCODE value
                         */
                        Block.BlockType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNKNOWN"] = 0;
                            values[valuesById[1] = "TEXT"] = 1;
                            values[valuesById[2] = "TABLE"] = 2;
                            values[valuesById[3] = "PICTURE"] = 3;
                            values[valuesById[4] = "RULER"] = 4;
                            values[valuesById[5] = "BARCODE"] = 5;
                            return values;
                        })();
    
                        return Block;
                    })();
    
                    v1p1beta1.Paragraph = (function() {
    
                        /**
                         * Properties of a Paragraph.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IParagraph
                         * @property {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null} [property] Paragraph property
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingBox] Paragraph boundingBox
                         * @property {Array.<google.cloud.vision.v1p1beta1.IWord>|null} [words] Paragraph words
                         * @property {number|null} [confidence] Paragraph confidence
                         */
    
                        /**
                         * Constructs a new Paragraph.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Paragraph.
                         * @implements IParagraph
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IParagraph=} [properties] Properties to set
                         */
                        function Paragraph(properties) {
                            this.words = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Paragraph property.
                         * @member {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.property = null;
    
                        /**
                         * Paragraph boundingBox.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.boundingBox = null;
    
                        /**
                         * Paragraph words.
                         * @member {Array.<google.cloud.vision.v1p1beta1.IWord>} words
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.words = $util.emptyArray;
    
                        /**
                         * Paragraph confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.confidence = 0;
    
                        /**
                         * Creates a new Paragraph instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IParagraph=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Paragraph} Paragraph instance
                         */
                        Paragraph.create = function create(properties) {
                            return new Paragraph(properties);
                        };
    
                        /**
                         * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Paragraph.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.words != null && message.words.length)
                                for (var i = 0; i < message.words.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Word.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Paragraph.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Paragraph();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.words && message.words.length))
                                            message.words = [];
                                        message.words.push($root.google.cloud.vision.v1p1beta1.Word.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Paragraph message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Paragraph.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.words != null && message.hasOwnProperty("words")) {
                                if (!Array.isArray(message.words))
                                    return "words: array expected";
                                for (var i = 0; i < message.words.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Word.verify(message.words[i]);
                                    if (error)
                                        return "words." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Paragraph} Paragraph
                         */
                        Paragraph.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Paragraph)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Paragraph();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Paragraph.property: object expected");
                                message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Paragraph.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.words) {
                                if (!Array.isArray(object.words))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Paragraph.words: array expected");
                                message.words = [];
                                for (var i = 0; i < object.words.length; ++i) {
                                    if (typeof object.words[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.Paragraph.words: object expected");
                                    message.words[i] = $root.google.cloud.vision.v1p1beta1.Word.fromObject(object.words[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Paragraph} message Paragraph
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Paragraph.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.words = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.words && message.words.length) {
                                object.words = [];
                                for (var j = 0; j < message.words.length; ++j)
                                    object.words[j] = $root.google.cloud.vision.v1p1beta1.Word.toObject(message.words[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Paragraph to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Paragraph.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Paragraph
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Paragraph
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Paragraph";
                        };
    
                        return Paragraph;
                    })();
    
                    v1p1beta1.Word = (function() {
    
                        /**
                         * Properties of a Word.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IWord
                         * @property {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null} [property] Word property
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingBox] Word boundingBox
                         * @property {Array.<google.cloud.vision.v1p1beta1.ISymbol>|null} [symbols] Word symbols
                         * @property {number|null} [confidence] Word confidence
                         */
    
                        /**
                         * Constructs a new Word.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Word.
                         * @implements IWord
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IWord=} [properties] Properties to set
                         */
                        function Word(properties) {
                            this.symbols = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Word property.
                         * @member {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @instance
                         */
                        Word.prototype.property = null;
    
                        /**
                         * Word boundingBox.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @instance
                         */
                        Word.prototype.boundingBox = null;
    
                        /**
                         * Word symbols.
                         * @member {Array.<google.cloud.vision.v1p1beta1.ISymbol>} symbols
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @instance
                         */
                        Word.prototype.symbols = $util.emptyArray;
    
                        /**
                         * Word confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @instance
                         */
                        Word.prototype.confidence = 0;
    
                        /**
                         * Creates a new Word instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWord=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Word} Word instance
                         */
                        Word.create = function create(properties) {
                            return new Word(properties);
                        };
    
                        /**
                         * Encodes the specified Word message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Word.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.symbols != null && message.symbols.length)
                                for (var i = 0; i < message.symbols.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.Symbol.encode(message.symbols[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Word message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Word.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Word();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.symbols && message.symbols.length))
                                            message.symbols = [];
                                        message.symbols.push($root.google.cloud.vision.v1p1beta1.Symbol.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Word message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Word.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.symbols != null && message.hasOwnProperty("symbols")) {
                                if (!Array.isArray(message.symbols))
                                    return "symbols: array expected";
                                for (var i = 0; i < message.symbols.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.Symbol.verify(message.symbols[i]);
                                    if (error)
                                        return "symbols." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Word message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Word} Word
                         */
                        Word.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Word)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Word();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Word.property: object expected");
                                message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Word.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.symbols) {
                                if (!Array.isArray(object.symbols))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Word.symbols: array expected");
                                message.symbols = [];
                                for (var i = 0; i < object.symbols.length; ++i) {
                                    if (typeof object.symbols[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.Word.symbols: object expected");
                                    message.symbols[i] = $root.google.cloud.vision.v1p1beta1.Symbol.fromObject(object.symbols[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Word message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Word} message Word
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Word.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.symbols = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.symbols && message.symbols.length) {
                                object.symbols = [];
                                for (var j = 0; j < message.symbols.length; ++j)
                                    object.symbols[j] = $root.google.cloud.vision.v1p1beta1.Symbol.toObject(message.symbols[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Word to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Word.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Word
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Word
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Word.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Word";
                        };
    
                        return Word;
                    })();
    
                    v1p1beta1.Symbol = (function() {
    
                        /**
                         * Properties of a Symbol.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface ISymbol
                         * @property {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null} [property] Symbol property
                         * @property {google.cloud.vision.v1p1beta1.IBoundingPoly|null} [boundingBox] Symbol boundingBox
                         * @property {string|null} [text] Symbol text
                         * @property {number|null} [confidence] Symbol confidence
                         */
    
                        /**
                         * Constructs a new Symbol.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a Symbol.
                         * @implements ISymbol
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.ISymbol=} [properties] Properties to set
                         */
                        function Symbol(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Symbol property.
                         * @member {google.cloud.vision.v1p1beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.property = null;
    
                        /**
                         * Symbol boundingBox.
                         * @member {google.cloud.vision.v1p1beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.boundingBox = null;
    
                        /**
                         * Symbol text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.text = "";
    
                        /**
                         * Symbol confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.confidence = 0;
    
                        /**
                         * Creates a new Symbol instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISymbol=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.Symbol} Symbol instance
                         */
                        Symbol.create = function create(properties) {
                            return new Symbol(properties);
                        };
    
                        /**
                         * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.vision.v1p1beta1.Symbol.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p1beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.Symbol.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.Symbol();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.text = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Symbol message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Symbol.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p1beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.Symbol} Symbol
                         */
                        Symbol.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.Symbol)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.Symbol();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Symbol.property: object expected");
                                message.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p1beta1.Symbol.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Symbol message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.Symbol} message Symbol
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Symbol.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.text = "";
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p1beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Symbol to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Symbol.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Symbol
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.Symbol
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.Symbol";
                        };
    
                        return Symbol;
                    })();
    
                    v1p1beta1.WebDetection = (function() {
    
                        /**
                         * Properties of a WebDetection.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @interface IWebDetection
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebEntity>|null} [webEntities] WebDetection webEntities
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebDetection fullMatchingImages
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebDetection partialMatchingImages
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebPage>|null} [pagesWithMatchingImages] WebDetection pagesWithMatchingImages
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>|null} [visuallySimilarImages] WebDetection visuallySimilarImages
                         * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebLabel>|null} [bestGuessLabels] WebDetection bestGuessLabels
                         */
    
                        /**
                         * Constructs a new WebDetection.
                         * @memberof google.cloud.vision.v1p1beta1
                         * @classdesc Represents a WebDetection.
                         * @implements IWebDetection
                         * @constructor
                         * @param {google.cloud.vision.v1p1beta1.IWebDetection=} [properties] Properties to set
                         */
                        function WebDetection(properties) {
                            this.webEntities = [];
                            this.fullMatchingImages = [];
                            this.partialMatchingImages = [];
                            this.pagesWithMatchingImages = [];
                            this.visuallySimilarImages = [];
                            this.bestGuessLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetection webEntities.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebEntity>} webEntities
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.webEntities = $util.emptyArray;
    
                        /**
                         * WebDetection fullMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>} fullMatchingImages
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.fullMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection partialMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>} partialMatchingImages
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.partialMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection pagesWithMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebPage>} pagesWithMatchingImages
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.pagesWithMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection visuallySimilarImages.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>} visuallySimilarImages
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.visuallySimilarImages = $util.emptyArray;
    
                        /**
                         * WebDetection bestGuessLabels.
                         * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebLabel>} bestGuessLabels
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.bestGuessLabels = $util.emptyArray;
    
                        /**
                         * Creates a new WebDetection instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetection=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p1beta1.WebDetection} WebDetection instance
                         */
                        WebDetection.create = function create(properties) {
                            return new WebDetection(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetection message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.webEntities != null && message.webEntities.length)
                                for (var i = 0; i < message.webEntities.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.encode(message.webEntities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pagesWithMatchingImages != null && message.pagesWithMatchingImages.length)
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage.encode(message.pagesWithMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.visuallySimilarImages != null && message.visuallySimilarImages.length)
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.encode(message.visuallySimilarImages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.bestGuessLabels != null && message.bestGuessLabels.length)
                                for (var i = 0; i < message.bestGuessLabels.length; ++i)
                                    $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.encode(message.bestGuessLabels[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetection message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p1beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetection();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.webEntities && message.webEntities.length))
                                            message.webEntities = [];
                                        message.webEntities.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                            message.fullMatchingImages = [];
                                        message.fullMatchingImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                            message.partialMatchingImages = [];
                                        message.partialMatchingImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pagesWithMatchingImages && message.pagesWithMatchingImages.length))
                                            message.pagesWithMatchingImages = [];
                                        message.pagesWithMatchingImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebPage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.visuallySimilarImages && message.visuallySimilarImages.length))
                                            message.visuallySimilarImages = [];
                                        message.visuallySimilarImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 8: {
                                        if (!(message.bestGuessLabels && message.bestGuessLabels.length))
                                            message.bestGuessLabels = [];
                                        message.bestGuessLabels.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p1beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetection message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetection.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.webEntities != null && message.hasOwnProperty("webEntities")) {
                                if (!Array.isArray(message.webEntities))
                                    return "webEntities: array expected";
                                for (var i = 0; i < message.webEntities.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.verify(message.webEntities[i]);
                                    if (error)
                                        return "webEntities." + error;
                                }
                            }
                            if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                if (!Array.isArray(message.fullMatchingImages))
                                    return "fullMatchingImages: array expected";
                                for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                    if (error)
                                        return "fullMatchingImages." + error;
                                }
                            }
                            if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                if (!Array.isArray(message.partialMatchingImages))
                                    return "partialMatchingImages: array expected";
                                for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                    if (error)
                                        return "partialMatchingImages." + error;
                                }
                            }
                            if (message.pagesWithMatchingImages != null && message.hasOwnProperty("pagesWithMatchingImages")) {
                                if (!Array.isArray(message.pagesWithMatchingImages))
                                    return "pagesWithMatchingImages: array expected";
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage.verify(message.pagesWithMatchingImages[i]);
                                    if (error)
                                        return "pagesWithMatchingImages." + error;
                                }
                            }
                            if (message.visuallySimilarImages != null && message.hasOwnProperty("visuallySimilarImages")) {
                                if (!Array.isArray(message.visuallySimilarImages))
                                    return "visuallySimilarImages: array expected";
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify(message.visuallySimilarImages[i]);
                                    if (error)
                                        return "visuallySimilarImages." + error;
                                }
                            }
                            if (message.bestGuessLabels != null && message.hasOwnProperty("bestGuessLabels")) {
                                if (!Array.isArray(message.bestGuessLabels))
                                    return "bestGuessLabels: array expected";
                                for (var i = 0; i < message.bestGuessLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.verify(message.bestGuessLabels[i]);
                                    if (error)
                                        return "bestGuessLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a WebDetection message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p1beta1.WebDetection} WebDetection
                         */
                        WebDetection.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetection)
                                return object;
                            var message = new $root.google.cloud.vision.v1p1beta1.WebDetection();
                            if (object.webEntities) {
                                if (!Array.isArray(object.webEntities))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.webEntities: array expected");
                                message.webEntities = [];
                                for (var i = 0; i < object.webEntities.length; ++i) {
                                    if (typeof object.webEntities[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.webEntities: object expected");
                                    message.webEntities[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.fromObject(object.webEntities[i]);
                                }
                            }
                            if (object.fullMatchingImages) {
                                if (!Array.isArray(object.fullMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.fullMatchingImages: array expected");
                                message.fullMatchingImages = [];
                                for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                    if (typeof object.fullMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.fullMatchingImages: object expected");
                                    message.fullMatchingImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                }
                            }
                            if (object.partialMatchingImages) {
                                if (!Array.isArray(object.partialMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.partialMatchingImages: array expected");
                                message.partialMatchingImages = [];
                                for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                    if (typeof object.partialMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.partialMatchingImages: object expected");
                                    message.partialMatchingImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                }
                            }
                            if (object.pagesWithMatchingImages) {
                                if (!Array.isArray(object.pagesWithMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.pagesWithMatchingImages: array expected");
                                message.pagesWithMatchingImages = [];
                                for (var i = 0; i < object.pagesWithMatchingImages.length; ++i) {
                                    if (typeof object.pagesWithMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.pagesWithMatchingImages: object expected");
                                    message.pagesWithMatchingImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage.fromObject(object.pagesWithMatchingImages[i]);
                                }
                            }
                            if (object.visuallySimilarImages) {
                                if (!Array.isArray(object.visuallySimilarImages))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.visuallySimilarImages: array expected");
                                message.visuallySimilarImages = [];
                                for (var i = 0; i < object.visuallySimilarImages.length; ++i) {
                                    if (typeof object.visuallySimilarImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.visuallySimilarImages: object expected");
                                    message.visuallySimilarImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.fromObject(object.visuallySimilarImages[i]);
                                }
                            }
                            if (object.bestGuessLabels) {
                                if (!Array.isArray(object.bestGuessLabels))
                                    throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.bestGuessLabels: array expected");
                                message.bestGuessLabels = [];
                                for (var i = 0; i < object.bestGuessLabels.length; ++i) {
                                    if (typeof object.bestGuessLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.bestGuessLabels: object expected");
                                    message.bestGuessLabels[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.fromObject(object.bestGuessLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetection message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p1beta1.WebDetection} message WebDetection
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetection.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.webEntities = [];
                                object.fullMatchingImages = [];
                                object.partialMatchingImages = [];
                                object.pagesWithMatchingImages = [];
                                object.visuallySimilarImages = [];
                                object.bestGuessLabels = [];
                            }
                            if (message.webEntities && message.webEntities.length) {
                                object.webEntities = [];
                                for (var j = 0; j < message.webEntities.length; ++j)
                                    object.webEntities[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.toObject(message.webEntities[j], options);
                            }
                            if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                object.fullMatchingImages = [];
                                for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                    object.fullMatchingImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                            }
                            if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                object.partialMatchingImages = [];
                                for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                    object.partialMatchingImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                            }
                            if (message.pagesWithMatchingImages && message.pagesWithMatchingImages.length) {
                                object.pagesWithMatchingImages = [];
                                for (var j = 0; j < message.pagesWithMatchingImages.length; ++j)
                                    object.pagesWithMatchingImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage.toObject(message.pagesWithMatchingImages[j], options);
                            }
                            if (message.visuallySimilarImages && message.visuallySimilarImages.length) {
                                object.visuallySimilarImages = [];
                                for (var j = 0; j < message.visuallySimilarImages.length; ++j)
                                    object.visuallySimilarImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.toObject(message.visuallySimilarImages[j], options);
                            }
                            if (message.bestGuessLabels && message.bestGuessLabels.length) {
                                object.bestGuessLabels = [];
                                for (var j = 0; j < message.bestGuessLabels.length; ++j)
                                    object.bestGuessLabels[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.toObject(message.bestGuessLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this WebDetection to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetection.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetection
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p1beta1.WebDetection
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetection";
                        };
    
                        WebDetection.WebEntity = (function() {
    
                            /**
                             * Properties of a WebEntity.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @interface IWebEntity
                             * @property {string|null} [entityId] WebEntity entityId
                             * @property {number|null} [score] WebEntity score
                             * @property {string|null} [description] WebEntity description
                             */
    
                            /**
                             * Constructs a new WebEntity.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @classdesc Represents a WebEntity.
                             * @implements IWebEntity
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             */
                            function WebEntity(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebEntity entityId.
                             * @member {string} entityId
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.entityId = "";
    
                            /**
                             * WebEntity score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.score = 0;
    
                            /**
                             * WebEntity description.
                             * @member {string} description
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.description = "";
    
                            /**
                             * Creates a new WebEntity instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebEntity} WebEntity instance
                             */
                            WebEntity.create = function create(properties) {
                                return new WebEntity(properties);
                            };
    
                            /**
                             * Encodes the specified WebEntity message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityId);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebEntity message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.entityId = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.description = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebEntity message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebEntity.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    if (!$util.isString(message.entityId))
                                        return "entityId: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.description != null && message.hasOwnProperty("description"))
                                    if (!$util.isString(message.description))
                                        return "description: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebEntity message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebEntity} WebEntity
                             */
                            WebEntity.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebEntity();
                                if (object.entityId != null)
                                    message.entityId = String(object.entityId);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.description != null)
                                    message.description = String(object.description);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebEntity message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.WebEntity} message WebEntity
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebEntity.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.entityId = "";
                                    object.score = 0;
                                    object.description = "";
                                }
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    object.entityId = message.entityId;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.description != null && message.hasOwnProperty("description"))
                                    object.description = message.description;
                                return object;
                            };
    
                            /**
                             * Converts this WebEntity to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebEntity.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebEntity
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebEntity
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetection.WebEntity";
                            };
    
                            return WebEntity;
                        })();
    
                        WebDetection.WebImage = (function() {
    
                            /**
                             * Properties of a WebImage.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @interface IWebImage
                             * @property {string|null} [url] WebImage url
                             * @property {number|null} [score] WebImage score
                             */
    
                            /**
                             * Constructs a new WebImage.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @classdesc Represents a WebImage.
                             * @implements IWebImage
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebImage=} [properties] Properties to set
                             */
                            function WebImage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebImage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.url = "";
    
                            /**
                             * WebImage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.score = 0;
    
                            /**
                             * Creates a new WebImage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebImage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebImage} WebImage instance
                             */
                            WebImage.create = function create(properties) {
                                return new WebImage(properties);
                            };
    
                            /**
                             * Encodes the specified WebImage message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebImage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebImage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebImage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebImage} WebImage
                             */
                            WebImage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebImage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.WebImage} message WebImage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebImage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this WebImage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebImage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebImage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebImage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetection.WebImage";
                            };
    
                            return WebImage;
                        })();
    
                        WebDetection.WebPage = (function() {
    
                            /**
                             * Properties of a WebPage.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @interface IWebPage
                             * @property {string|null} [url] WebPage url
                             * @property {number|null} [score] WebPage score
                             * @property {string|null} [pageTitle] WebPage pageTitle
                             * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebPage fullMatchingImages
                             * @property {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebPage partialMatchingImages
                             */
    
                            /**
                             * Constructs a new WebPage.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @classdesc Represents a WebPage.
                             * @implements IWebPage
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebPage=} [properties] Properties to set
                             */
                            function WebPage(properties) {
                                this.fullMatchingImages = [];
                                this.partialMatchingImages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebPage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.url = "";
    
                            /**
                             * WebPage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.score = 0;
    
                            /**
                             * WebPage pageTitle.
                             * @member {string} pageTitle
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.pageTitle = "";
    
                            /**
                             * WebPage fullMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>} fullMatchingImages
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.fullMatchingImages = $util.emptyArray;
    
                            /**
                             * WebPage partialMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p1beta1.WebDetection.IWebImage>} partialMatchingImages
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.partialMatchingImages = $util.emptyArray;
    
                            /**
                             * Creates a new WebPage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebPage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebPage} WebPage instance
                             */
                            WebPage.create = function create(properties) {
                                return new WebPage(properties);
                            };
    
                            /**
                             * Encodes the specified WebPage message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.pageTitle != null && Object.hasOwnProperty.call(message, "pageTitle"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageTitle);
                                if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebPage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.pageTitle = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                                message.fullMatchingImages = [];
                                            message.fullMatchingImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 5: {
                                            if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                                message.partialMatchingImages = [];
                                            message.partialMatchingImages.push($root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebPage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebPage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    if (!$util.isString(message.pageTitle))
                                        return "pageTitle: string expected";
                                if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                    if (!Array.isArray(message.fullMatchingImages))
                                        return "fullMatchingImages: array expected";
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                        if (error)
                                            return "fullMatchingImages." + error;
                                    }
                                }
                                if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                    if (!Array.isArray(message.partialMatchingImages))
                                        return "partialMatchingImages: array expected";
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                        if (error)
                                            return "partialMatchingImages." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a WebPage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebPage} WebPage
                             */
                            WebPage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebPage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.pageTitle != null)
                                    message.pageTitle = String(object.pageTitle);
                                if (object.fullMatchingImages) {
                                    if (!Array.isArray(object.fullMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.WebPage.fullMatchingImages: array expected");
                                    message.fullMatchingImages = [];
                                    for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                        if (typeof object.fullMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.WebPage.fullMatchingImages: object expected");
                                        message.fullMatchingImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                    }
                                }
                                if (object.partialMatchingImages) {
                                    if (!Array.isArray(object.partialMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.WebPage.partialMatchingImages: array expected");
                                    message.partialMatchingImages = [];
                                    for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                        if (typeof object.partialMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p1beta1.WebDetection.WebPage.partialMatchingImages: object expected");
                                        message.partialMatchingImages[i] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebPage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.WebPage} message WebPage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebPage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.fullMatchingImages = [];
                                    object.partialMatchingImages = [];
                                }
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                    object.pageTitle = "";
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    object.pageTitle = message.pageTitle;
                                if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                    object.fullMatchingImages = [];
                                    for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                        object.fullMatchingImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                                }
                                if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                    object.partialMatchingImages = [];
                                    for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                        object.partialMatchingImages[j] = $root.google.cloud.vision.v1p1beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this WebPage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebPage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebPage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebPage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebPage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetection.WebPage";
                            };
    
                            return WebPage;
                        })();
    
                        WebDetection.WebLabel = (function() {
    
                            /**
                             * Properties of a WebLabel.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @interface IWebLabel
                             * @property {string|null} [label] WebLabel label
                             * @property {string|null} [languageCode] WebLabel languageCode
                             */
    
                            /**
                             * Constructs a new WebLabel.
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection
                             * @classdesc Represents a WebLabel.
                             * @implements IWebLabel
                             * @constructor
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             */
                            function WebLabel(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebLabel label.
                             * @member {string} label
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.label = "";
    
                            /**
                             * WebLabel languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.languageCode = "";
    
                            /**
                             * Creates a new WebLabel instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebLabel} WebLabel instance
                             */
                            WebLabel.create = function create(properties) {
                                return new WebLabel(properties);
                            };
    
                            /**
                             * Encodes the specified WebLabel message. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebLabel message, length delimited. Does not implicitly {@link google.cloud.vision.v1p1beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.label = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebLabel message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebLabel.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.label != null && message.hasOwnProperty("label"))
                                    if (!$util.isString(message.label))
                                        return "label: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebLabel message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p1beta1.WebDetection.WebLabel} WebLabel
                             */
                            WebLabel.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p1beta1.WebDetection.WebLabel();
                                if (object.label != null)
                                    message.label = String(object.label);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebLabel message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p1beta1.WebDetection.WebLabel} message WebLabel
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebLabel.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.label = "";
                                    object.languageCode = "";
                                }
                                if (message.label != null && message.hasOwnProperty("label"))
                                    object.label = message.label;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                return object;
                            };
    
                            /**
                             * Converts this WebLabel to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebLabel.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebLabel
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p1beta1.WebDetection.WebLabel
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p1beta1.WebDetection.WebLabel";
                            };
    
                            return WebLabel;
                        })();
    
                        return WebDetection;
                    })();
    
                    return v1p1beta1;
                })();
    
                vision.v1p2beta1 = (function() {
    
                    /**
                     * Namespace v1p2beta1.
                     * @memberof google.cloud.vision
                     * @namespace
                     */
                    var v1p2beta1 = {};
    
                    v1p2beta1.Vertex = (function() {
    
                        /**
                         * Properties of a Vertex.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IVertex
                         * @property {number|null} [x] Vertex x
                         * @property {number|null} [y] Vertex y
                         */
    
                        /**
                         * Constructs a new Vertex.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Vertex.
                         * @implements IVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IVertex=} [properties] Properties to set
                         */
                        function Vertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Vertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.x = 0;
    
                        /**
                         * Vertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.y = 0;
    
                        /**
                         * Creates a new Vertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Vertex} Vertex instance
                         */
                        Vertex.create = function create(properties) {
                            return new Vertex(properties);
                        };
    
                        /**
                         * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Vertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Vertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Vertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Vertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Vertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (!$util.isInteger(message.x))
                                    return "x: integer expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (!$util.isInteger(message.y))
                                    return "y: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Vertex} Vertex
                         */
                        Vertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Vertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Vertex();
                            if (object.x != null)
                                message.x = object.x | 0;
                            if (object.y != null)
                                message.y = object.y | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Vertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Vertex} message Vertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Vertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = message.y;
                            return object;
                        };
    
                        /**
                         * Converts this Vertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Vertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Vertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Vertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Vertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Vertex";
                        };
    
                        return Vertex;
                    })();
    
                    v1p2beta1.NormalizedVertex = (function() {
    
                        /**
                         * Properties of a NormalizedVertex.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface INormalizedVertex
                         * @property {number|null} [x] NormalizedVertex x
                         * @property {number|null} [y] NormalizedVertex y
                         */
    
                        /**
                         * Constructs a new NormalizedVertex.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a NormalizedVertex.
                         * @implements INormalizedVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.INormalizedVertex=} [properties] Properties to set
                         */
                        function NormalizedVertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * NormalizedVertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.x = 0;
    
                        /**
                         * NormalizedVertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.y = 0;
    
                        /**
                         * Creates a new NormalizedVertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.INormalizedVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.NormalizedVertex} NormalizedVertex instance
                         */
                        NormalizedVertex.create = function create(properties) {
                            return new NormalizedVertex(properties);
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.vision.v1p2beta1.NormalizedVertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.NormalizedVertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.NormalizedVertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a NormalizedVertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        NormalizedVertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.NormalizedVertex} NormalizedVertex
                         */
                        NormalizedVertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.NormalizedVertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.NormalizedVertex();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.NormalizedVertex} message NormalizedVertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        NormalizedVertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            return object;
                        };
    
                        /**
                         * Converts this NormalizedVertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        NormalizedVertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for NormalizedVertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.NormalizedVertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        NormalizedVertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.NormalizedVertex";
                        };
    
                        return NormalizedVertex;
                    })();
    
                    v1p2beta1.BoundingPoly = (function() {
    
                        /**
                         * Properties of a BoundingPoly.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p2beta1.IVertex>|null} [vertices] BoundingPoly vertices
                         * @property {Array.<google.cloud.vision.v1p2beta1.INormalizedVertex>|null} [normalizedVertices] BoundingPoly normalizedVertices
                         */
    
                        /**
                         * Constructs a new BoundingPoly.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a BoundingPoly.
                         * @implements IBoundingPoly
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IBoundingPoly=} [properties] Properties to set
                         */
                        function BoundingPoly(properties) {
                            this.vertices = [];
                            this.normalizedVertices = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BoundingPoly vertices.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IVertex>} vertices
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.vertices = $util.emptyArray;
    
                        /**
                         * BoundingPoly normalizedVertices.
                         * @member {Array.<google.cloud.vision.v1p2beta1.INormalizedVertex>} normalizedVertices
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.normalizedVertices = $util.emptyArray;
    
                        /**
                         * Creates a new BoundingPoly instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBoundingPoly=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.BoundingPoly} BoundingPoly instance
                         */
                        BoundingPoly.create = function create(properties) {
                            return new BoundingPoly(properties);
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1p2beta1.BoundingPoly.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.vertices != null && message.vertices.length)
                                for (var i = 0; i < message.vertices.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.normalizedVertices != null && message.normalizedVertices.length)
                                for (var i = 0; i < message.normalizedVertices.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.BoundingPoly.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.BoundingPoly();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.vertices && message.vertices.length))
                                            message.vertices = [];
                                        message.vertices.push($root.google.cloud.vision.v1p2beta1.Vertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.normalizedVertices && message.normalizedVertices.length))
                                            message.normalizedVertices = [];
                                        message.normalizedVertices.push($root.google.cloud.vision.v1p2beta1.NormalizedVertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BoundingPoly message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BoundingPoly.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.vertices != null && message.hasOwnProperty("vertices")) {
                                if (!Array.isArray(message.vertices))
                                    return "vertices: array expected";
                                for (var i = 0; i < message.vertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Vertex.verify(message.vertices[i]);
                                    if (error)
                                        return "vertices." + error;
                                }
                            }
                            if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) {
                                if (!Array.isArray(message.normalizedVertices))
                                    return "normalizedVertices: array expected";
                                for (var i = 0; i < message.normalizedVertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.NormalizedVertex.verify(message.normalizedVertices[i]);
                                    if (error)
                                        return "normalizedVertices." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.BoundingPoly} BoundingPoly
                         */
                        BoundingPoly.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.BoundingPoly)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.BoundingPoly();
                            if (object.vertices) {
                                if (!Array.isArray(object.vertices))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.BoundingPoly.vertices: array expected");
                                message.vertices = [];
                                for (var i = 0; i < object.vertices.length; ++i) {
                                    if (typeof object.vertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.BoundingPoly.vertices: object expected");
                                    message.vertices[i] = $root.google.cloud.vision.v1p2beta1.Vertex.fromObject(object.vertices[i]);
                                }
                            }
                            if (object.normalizedVertices) {
                                if (!Array.isArray(object.normalizedVertices))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.BoundingPoly.normalizedVertices: array expected");
                                message.normalizedVertices = [];
                                for (var i = 0; i < object.normalizedVertices.length; ++i) {
                                    if (typeof object.normalizedVertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.BoundingPoly.normalizedVertices: object expected");
                                    message.normalizedVertices[i] = $root.google.cloud.vision.v1p2beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.BoundingPoly} message BoundingPoly
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BoundingPoly.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.vertices = [];
                                object.normalizedVertices = [];
                            }
                            if (message.vertices && message.vertices.length) {
                                object.vertices = [];
                                for (var j = 0; j < message.vertices.length; ++j)
                                    object.vertices[j] = $root.google.cloud.vision.v1p2beta1.Vertex.toObject(message.vertices[j], options);
                            }
                            if (message.normalizedVertices && message.normalizedVertices.length) {
                                object.normalizedVertices = [];
                                for (var j = 0; j < message.normalizedVertices.length; ++j)
                                    object.normalizedVertices[j] = $root.google.cloud.vision.v1p2beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BoundingPoly to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BoundingPoly.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BoundingPoly
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.BoundingPoly
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BoundingPoly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.BoundingPoly";
                        };
    
                        return BoundingPoly;
                    })();
    
                    v1p2beta1.Position = (function() {
    
                        /**
                         * Properties of a Position.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IPosition
                         * @property {number|null} [x] Position x
                         * @property {number|null} [y] Position y
                         * @property {number|null} [z] Position z
                         */
    
                        /**
                         * Constructs a new Position.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Position.
                         * @implements IPosition
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IPosition=} [properties] Properties to set
                         */
                        function Position(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Position x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @instance
                         */
                        Position.prototype.x = 0;
    
                        /**
                         * Position y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @instance
                         */
                        Position.prototype.y = 0;
    
                        /**
                         * Position z.
                         * @member {number} z
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @instance
                         */
                        Position.prototype.z = 0;
    
                        /**
                         * Creates a new Position instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPosition=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Position} Position instance
                         */
                        Position.create = function create(properties) {
                            return new Position(properties);
                        };
    
                        /**
                         * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Position.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            if (message.z != null && Object.hasOwnProperty.call(message, "z"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.z);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Position.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Position();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.z = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Position message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Position.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            if (message.z != null && message.hasOwnProperty("z"))
                                if (typeof message.z !== "number")
                                    return "z: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Position message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Position} Position
                         */
                        Position.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Position)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Position();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            if (object.z != null)
                                message.z = Number(object.z);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Position message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Position} message Position
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Position.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                                object.z = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            if (message.z != null && message.hasOwnProperty("z"))
                                object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z;
                            return object;
                        };
    
                        /**
                         * Converts this Position to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Position.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Position
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Position
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Position";
                        };
    
                        return Position;
                    })();
    
                    v1p2beta1.ImageAnnotator = (function() {
    
                        /**
                         * Constructs a new ImageAnnotator service.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an ImageAnnotator
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ImageAnnotator(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ImageAnnotator.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageAnnotator;
    
                        /**
                         * Creates new ImageAnnotator service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ImageAnnotator} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ImageAnnotator.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p2beta1.ImageAnnotator|batchAnnotateImages}.
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @typedef BatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} [response] BatchAnnotateImagesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p2beta1.ImageAnnotator.BatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateImages = function batchAnnotateImages(request, callback) {
                            return this.rpcCall(batchAnnotateImages, $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest, $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateImages" });
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p2beta1.ImageAnnotator|asyncBatchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1p2beta1.ImageAnnotator.AsyncBatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateFiles = function asyncBatchAnnotateFiles(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateFiles, $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateFiles" });
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ImageAnnotator;
                    })();
    
                    v1p2beta1.Feature = (function() {
    
                        /**
                         * Properties of a Feature.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IFeature
                         * @property {google.cloud.vision.v1p2beta1.Feature.Type|null} [type] Feature type
                         * @property {number|null} [maxResults] Feature maxResults
                         * @property {string|null} [model] Feature model
                         */
    
                        /**
                         * Constructs a new Feature.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Feature.
                         * @implements IFeature
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IFeature=} [properties] Properties to set
                         */
                        function Feature(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Feature type.
                         * @member {google.cloud.vision.v1p2beta1.Feature.Type} type
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @instance
                         */
                        Feature.prototype.type = 0;
    
                        /**
                         * Feature maxResults.
                         * @member {number} maxResults
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @instance
                         */
                        Feature.prototype.maxResults = 0;
    
                        /**
                         * Feature model.
                         * @member {string} model
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @instance
                         */
                        Feature.prototype.model = "";
    
                        /**
                         * Creates a new Feature instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFeature=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Feature} Feature instance
                         */
                        Feature.create = function create(properties) {
                            return new Feature(properties);
                        };
    
                        /**
                         * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Feature.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                            if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults);
                            if (message.model != null && Object.hasOwnProperty.call(message, "model"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.model);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Feature.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Feature();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.type = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.maxResults = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.model = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Feature message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Feature.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.type != null && message.hasOwnProperty("type"))
                                switch (message.type) {
                                default:
                                    return "type: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 11:
                                case 6:
                                case 7:
                                case 9:
                                case 10:
                                    break;
                                }
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                if (!$util.isInteger(message.maxResults))
                                    return "maxResults: integer expected";
                            if (message.model != null && message.hasOwnProperty("model"))
                                if (!$util.isString(message.model))
                                    return "model: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Feature message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Feature} Feature
                         */
                        Feature.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Feature)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Feature();
                            switch (object.type) {
                            default:
                                if (typeof object.type === "number") {
                                    message.type = object.type;
                                    break;
                                }
                                break;
                            case "TYPE_UNSPECIFIED":
                            case 0:
                                message.type = 0;
                                break;
                            case "FACE_DETECTION":
                            case 1:
                                message.type = 1;
                                break;
                            case "LANDMARK_DETECTION":
                            case 2:
                                message.type = 2;
                                break;
                            case "LOGO_DETECTION":
                            case 3:
                                message.type = 3;
                                break;
                            case "LABEL_DETECTION":
                            case 4:
                                message.type = 4;
                                break;
                            case "TEXT_DETECTION":
                            case 5:
                                message.type = 5;
                                break;
                            case "DOCUMENT_TEXT_DETECTION":
                            case 11:
                                message.type = 11;
                                break;
                            case "SAFE_SEARCH_DETECTION":
                            case 6:
                                message.type = 6;
                                break;
                            case "IMAGE_PROPERTIES":
                            case 7:
                                message.type = 7;
                                break;
                            case "CROP_HINTS":
                            case 9:
                                message.type = 9;
                                break;
                            case "WEB_DETECTION":
                            case 10:
                                message.type = 10;
                                break;
                            }
                            if (object.maxResults != null)
                                message.maxResults = object.maxResults | 0;
                            if (object.model != null)
                                message.model = String(object.model);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Feature message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Feature} message Feature
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Feature.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
                                object.maxResults = 0;
                                object.model = "";
                            }
                            if (message.type != null && message.hasOwnProperty("type"))
                                object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.Feature.Type[message.type] : message.type;
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                object.maxResults = message.maxResults;
                            if (message.model != null && message.hasOwnProperty("model"))
                                object.model = message.model;
                            return object;
                        };
    
                        /**
                         * Converts this Feature to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Feature.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Feature
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Feature
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Feature.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Feature";
                        };
    
                        /**
                         * Type enum.
                         * @name google.cloud.vision.v1p2beta1.Feature.Type
                         * @enum {number}
                         * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
                         * @property {number} FACE_DETECTION=1 FACE_DETECTION value
                         * @property {number} LANDMARK_DETECTION=2 LANDMARK_DETECTION value
                         * @property {number} LOGO_DETECTION=3 LOGO_DETECTION value
                         * @property {number} LABEL_DETECTION=4 LABEL_DETECTION value
                         * @property {number} TEXT_DETECTION=5 TEXT_DETECTION value
                         * @property {number} DOCUMENT_TEXT_DETECTION=11 DOCUMENT_TEXT_DETECTION value
                         * @property {number} SAFE_SEARCH_DETECTION=6 SAFE_SEARCH_DETECTION value
                         * @property {number} IMAGE_PROPERTIES=7 IMAGE_PROPERTIES value
                         * @property {number} CROP_HINTS=9 CROP_HINTS value
                         * @property {number} WEB_DETECTION=10 WEB_DETECTION value
                         */
                        Feature.Type = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "FACE_DETECTION"] = 1;
                            values[valuesById[2] = "LANDMARK_DETECTION"] = 2;
                            values[valuesById[3] = "LOGO_DETECTION"] = 3;
                            values[valuesById[4] = "LABEL_DETECTION"] = 4;
                            values[valuesById[5] = "TEXT_DETECTION"] = 5;
                            values[valuesById[11] = "DOCUMENT_TEXT_DETECTION"] = 11;
                            values[valuesById[6] = "SAFE_SEARCH_DETECTION"] = 6;
                            values[valuesById[7] = "IMAGE_PROPERTIES"] = 7;
                            values[valuesById[9] = "CROP_HINTS"] = 9;
                            values[valuesById[10] = "WEB_DETECTION"] = 10;
                            return values;
                        })();
    
                        return Feature;
                    })();
    
                    v1p2beta1.ImageSource = (function() {
    
                        /**
                         * Properties of an ImageSource.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IImageSource
                         * @property {string|null} [gcsImageUri] ImageSource gcsImageUri
                         * @property {string|null} [imageUri] ImageSource imageUri
                         */
    
                        /**
                         * Constructs a new ImageSource.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an ImageSource.
                         * @implements IImageSource
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IImageSource=} [properties] Properties to set
                         */
                        function ImageSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageSource gcsImageUri.
                         * @member {string} gcsImageUri
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.gcsImageUri = "";
    
                        /**
                         * ImageSource imageUri.
                         * @member {string} imageUri
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.imageUri = "";
    
                        /**
                         * Creates a new ImageSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.ImageSource} ImageSource instance
                         */
                        ImageSource.create = function create(properties) {
                            return new ImageSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsImageUri != null && Object.hasOwnProperty.call(message, "gcsImageUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsImageUri);
                            if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.ImageSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsImageUri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.imageUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                if (!$util.isString(message.gcsImageUri))
                                    return "gcsImageUri: string expected";
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                if (!$util.isString(message.imageUri))
                                    return "imageUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.ImageSource} ImageSource
                         */
                        ImageSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.ImageSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.ImageSource();
                            if (object.gcsImageUri != null)
                                message.gcsImageUri = String(object.gcsImageUri);
                            if (object.imageUri != null)
                                message.imageUri = String(object.imageUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ImageSource} message ImageSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsImageUri = "";
                                object.imageUri = "";
                            }
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                object.gcsImageUri = message.gcsImageUri;
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                object.imageUri = message.imageUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImageSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.ImageSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.ImageSource";
                        };
    
                        return ImageSource;
                    })();
    
                    v1p2beta1.Image = (function() {
    
                        /**
                         * Properties of an Image.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IImage
                         * @property {Uint8Array|null} [content] Image content
                         * @property {google.cloud.vision.v1p2beta1.IImageSource|null} [source] Image source
                         */
    
                        /**
                         * Constructs a new Image.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an Image.
                         * @implements IImage
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IImage=} [properties] Properties to set
                         */
                        function Image(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Image content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @instance
                         */
                        Image.prototype.content = $util.newBuffer([]);
    
                        /**
                         * Image source.
                         * @member {google.cloud.vision.v1p2beta1.IImageSource|null|undefined} source
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @instance
                         */
                        Image.prototype.source = null;
    
                        /**
                         * Creates a new Image instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Image} Image instance
                         */
                        Image.create = function create(properties) {
                            return new Image(properties);
                        };
    
                        /**
                         * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Image.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
                            if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                                $root.google.cloud.vision.v1p2beta1.ImageSource.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Image.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Image();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.source = $root.google.cloud.vision.v1p2beta1.ImageSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an Image message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Image.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.source != null && message.hasOwnProperty("source")) {
                                var error = $root.google.cloud.vision.v1p2beta1.ImageSource.verify(message.source);
                                if (error)
                                    return "source." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an Image message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Image} Image
                         */
                        Image.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Image)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Image();
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.source != null) {
                                if (typeof object.source !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Image.source: object expected");
                                message.source = $root.google.cloud.vision.v1p2beta1.ImageSource.fromObject(object.source);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an Image message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Image} message Image
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Image.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                                object.source = null;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            if (message.source != null && message.hasOwnProperty("source"))
                                object.source = $root.google.cloud.vision.v1p2beta1.ImageSource.toObject(message.source, options);
                            return object;
                        };
    
                        /**
                         * Converts this Image to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Image.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Image
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Image
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Image";
                        };
    
                        return Image;
                    })();
    
                    v1p2beta1.FaceAnnotation = (function() {
    
                        /**
                         * Properties of a FaceAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IFaceAnnotation
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingPoly] FaceAnnotation boundingPoly
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [fdBoundingPoly] FaceAnnotation fdBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark>|null} [landmarks] FaceAnnotation landmarks
                         * @property {number|null} [rollAngle] FaceAnnotation rollAngle
                         * @property {number|null} [panAngle] FaceAnnotation panAngle
                         * @property {number|null} [tiltAngle] FaceAnnotation tiltAngle
                         * @property {number|null} [detectionConfidence] FaceAnnotation detectionConfidence
                         * @property {number|null} [landmarkingConfidence] FaceAnnotation landmarkingConfidence
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [joyLikelihood] FaceAnnotation joyLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [sorrowLikelihood] FaceAnnotation sorrowLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [angerLikelihood] FaceAnnotation angerLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [surpriseLikelihood] FaceAnnotation surpriseLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [underExposedLikelihood] FaceAnnotation underExposedLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [blurredLikelihood] FaceAnnotation blurredLikelihood
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [headwearLikelihood] FaceAnnotation headwearLikelihood
                         */
    
                        /**
                         * Constructs a new FaceAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a FaceAnnotation.
                         * @implements IFaceAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IFaceAnnotation=} [properties] Properties to set
                         */
                        function FaceAnnotation(properties) {
                            this.landmarks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * FaceAnnotation fdBoundingPoly.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} fdBoundingPoly
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.fdBoundingPoly = null;
    
                        /**
                         * FaceAnnotation landmarks.
                         * @member {Array.<google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark>} landmarks
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarks = $util.emptyArray;
    
                        /**
                         * FaceAnnotation rollAngle.
                         * @member {number} rollAngle
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.rollAngle = 0;
    
                        /**
                         * FaceAnnotation panAngle.
                         * @member {number} panAngle
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.panAngle = 0;
    
                        /**
                         * FaceAnnotation tiltAngle.
                         * @member {number} tiltAngle
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.tiltAngle = 0;
    
                        /**
                         * FaceAnnotation detectionConfidence.
                         * @member {number} detectionConfidence
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.detectionConfidence = 0;
    
                        /**
                         * FaceAnnotation landmarkingConfidence.
                         * @member {number} landmarkingConfidence
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarkingConfidence = 0;
    
                        /**
                         * FaceAnnotation joyLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} joyLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.joyLikelihood = 0;
    
                        /**
                         * FaceAnnotation sorrowLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} sorrowLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.sorrowLikelihood = 0;
    
                        /**
                         * FaceAnnotation angerLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} angerLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.angerLikelihood = 0;
    
                        /**
                         * FaceAnnotation surpriseLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} surpriseLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.surpriseLikelihood = 0;
    
                        /**
                         * FaceAnnotation underExposedLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} underExposedLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.underExposedLikelihood = 0;
    
                        /**
                         * FaceAnnotation blurredLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} blurredLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.blurredLikelihood = 0;
    
                        /**
                         * FaceAnnotation headwearLikelihood.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} headwearLikelihood
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.headwearLikelihood = 0;
    
                        /**
                         * Creates a new FaceAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFaceAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation} FaceAnnotation instance
                         */
                        FaceAnnotation.create = function create(properties) {
                            return new FaceAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.FaceAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fdBoundingPoly != null && Object.hasOwnProperty.call(message, "fdBoundingPoly"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.fdBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.landmarks != null && message.landmarks.length)
                                for (var i = 0; i < message.landmarks.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.encode(message.landmarks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.rollAngle != null && Object.hasOwnProperty.call(message, "rollAngle"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.rollAngle);
                            if (message.panAngle != null && Object.hasOwnProperty.call(message, "panAngle"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.panAngle);
                            if (message.tiltAngle != null && Object.hasOwnProperty.call(message, "tiltAngle"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.tiltAngle);
                            if (message.detectionConfidence != null && Object.hasOwnProperty.call(message, "detectionConfidence"))
                                writer.uint32(/* id 7, wireType 5 =*/61).float(message.detectionConfidence);
                            if (message.landmarkingConfidence != null && Object.hasOwnProperty.call(message, "landmarkingConfidence"))
                                writer.uint32(/* id 8, wireType 5 =*/69).float(message.landmarkingConfidence);
                            if (message.joyLikelihood != null && Object.hasOwnProperty.call(message, "joyLikelihood"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.joyLikelihood);
                            if (message.sorrowLikelihood != null && Object.hasOwnProperty.call(message, "sorrowLikelihood"))
                                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.sorrowLikelihood);
                            if (message.angerLikelihood != null && Object.hasOwnProperty.call(message, "angerLikelihood"))
                                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.angerLikelihood);
                            if (message.surpriseLikelihood != null && Object.hasOwnProperty.call(message, "surpriseLikelihood"))
                                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.surpriseLikelihood);
                            if (message.underExposedLikelihood != null && Object.hasOwnProperty.call(message, "underExposedLikelihood"))
                                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.underExposedLikelihood);
                            if (message.blurredLikelihood != null && Object.hasOwnProperty.call(message, "blurredLikelihood"))
                                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.blurredLikelihood);
                            if (message.headwearLikelihood != null && Object.hasOwnProperty.call(message, "headwearLikelihood"))
                                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.headwearLikelihood);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.FaceAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.FaceAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.fdBoundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.landmarks && message.landmarks.length))
                                            message.landmarks = [];
                                        message.landmarks.push($root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.rollAngle = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.panAngle = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.tiltAngle = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.detectionConfidence = reader.float();
                                        break;
                                    }
                                case 8: {
                                        message.landmarkingConfidence = reader.float();
                                        break;
                                    }
                                case 9: {
                                        message.joyLikelihood = reader.int32();
                                        break;
                                    }
                                case 10: {
                                        message.sorrowLikelihood = reader.int32();
                                        break;
                                    }
                                case 11: {
                                        message.angerLikelihood = reader.int32();
                                        break;
                                    }
                                case 12: {
                                        message.surpriseLikelihood = reader.int32();
                                        break;
                                    }
                                case 13: {
                                        message.underExposedLikelihood = reader.int32();
                                        break;
                                    }
                                case 14: {
                                        message.blurredLikelihood = reader.int32();
                                        break;
                                    }
                                case 15: {
                                        message.headwearLikelihood = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.fdBoundingPoly);
                                if (error)
                                    return "fdBoundingPoly." + error;
                            }
                            if (message.landmarks != null && message.hasOwnProperty("landmarks")) {
                                if (!Array.isArray(message.landmarks))
                                    return "landmarks: array expected";
                                for (var i = 0; i < message.landmarks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.verify(message.landmarks[i]);
                                    if (error)
                                        return "landmarks." + error;
                                }
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                if (typeof message.rollAngle !== "number")
                                    return "rollAngle: number expected";
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                if (typeof message.panAngle !== "number")
                                    return "panAngle: number expected";
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                if (typeof message.tiltAngle !== "number")
                                    return "tiltAngle: number expected";
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                if (typeof message.detectionConfidence !== "number")
                                    return "detectionConfidence: number expected";
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                if (typeof message.landmarkingConfidence !== "number")
                                    return "landmarkingConfidence: number expected";
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                switch (message.joyLikelihood) {
                                default:
                                    return "joyLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                switch (message.sorrowLikelihood) {
                                default:
                                    return "sorrowLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                switch (message.angerLikelihood) {
                                default:
                                    return "angerLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                switch (message.surpriseLikelihood) {
                                default:
                                    return "surpriseLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                switch (message.underExposedLikelihood) {
                                default:
                                    return "underExposedLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                switch (message.blurredLikelihood) {
                                default:
                                    return "blurredLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                switch (message.headwearLikelihood) {
                                default:
                                    return "headwearLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a FaceAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation} FaceAnnotation
                         */
                        FaceAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.FaceAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.FaceAnnotation();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.FaceAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.fdBoundingPoly != null) {
                                if (typeof object.fdBoundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.FaceAnnotation.fdBoundingPoly: object expected");
                                message.fdBoundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.fdBoundingPoly);
                            }
                            if (object.landmarks) {
                                if (!Array.isArray(object.landmarks))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.FaceAnnotation.landmarks: array expected");
                                message.landmarks = [];
                                for (var i = 0; i < object.landmarks.length; ++i) {
                                    if (typeof object.landmarks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.FaceAnnotation.landmarks: object expected");
                                    message.landmarks[i] = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.fromObject(object.landmarks[i]);
                                }
                            }
                            if (object.rollAngle != null)
                                message.rollAngle = Number(object.rollAngle);
                            if (object.panAngle != null)
                                message.panAngle = Number(object.panAngle);
                            if (object.tiltAngle != null)
                                message.tiltAngle = Number(object.tiltAngle);
                            if (object.detectionConfidence != null)
                                message.detectionConfidence = Number(object.detectionConfidence);
                            if (object.landmarkingConfidence != null)
                                message.landmarkingConfidence = Number(object.landmarkingConfidence);
                            switch (object.joyLikelihood) {
                            default:
                                if (typeof object.joyLikelihood === "number") {
                                    message.joyLikelihood = object.joyLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.joyLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.joyLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.joyLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.joyLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.joyLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.joyLikelihood = 5;
                                break;
                            }
                            switch (object.sorrowLikelihood) {
                            default:
                                if (typeof object.sorrowLikelihood === "number") {
                                    message.sorrowLikelihood = object.sorrowLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.sorrowLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.sorrowLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.sorrowLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.sorrowLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.sorrowLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.sorrowLikelihood = 5;
                                break;
                            }
                            switch (object.angerLikelihood) {
                            default:
                                if (typeof object.angerLikelihood === "number") {
                                    message.angerLikelihood = object.angerLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.angerLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.angerLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.angerLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.angerLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.angerLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.angerLikelihood = 5;
                                break;
                            }
                            switch (object.surpriseLikelihood) {
                            default:
                                if (typeof object.surpriseLikelihood === "number") {
                                    message.surpriseLikelihood = object.surpriseLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.surpriseLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.surpriseLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.surpriseLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.surpriseLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.surpriseLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.surpriseLikelihood = 5;
                                break;
                            }
                            switch (object.underExposedLikelihood) {
                            default:
                                if (typeof object.underExposedLikelihood === "number") {
                                    message.underExposedLikelihood = object.underExposedLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.underExposedLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.underExposedLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.underExposedLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.underExposedLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.underExposedLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.underExposedLikelihood = 5;
                                break;
                            }
                            switch (object.blurredLikelihood) {
                            default:
                                if (typeof object.blurredLikelihood === "number") {
                                    message.blurredLikelihood = object.blurredLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blurredLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.blurredLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.blurredLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.blurredLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.blurredLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.blurredLikelihood = 5;
                                break;
                            }
                            switch (object.headwearLikelihood) {
                            default:
                                if (typeof object.headwearLikelihood === "number") {
                                    message.headwearLikelihood = object.headwearLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.headwearLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.headwearLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.headwearLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.headwearLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.headwearLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.headwearLikelihood = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.FaceAnnotation} message FaceAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.landmarks = [];
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.fdBoundingPoly = null;
                                object.rollAngle = 0;
                                object.panAngle = 0;
                                object.tiltAngle = 0;
                                object.detectionConfidence = 0;
                                object.landmarkingConfidence = 0;
                                object.joyLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.sorrowLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.angerLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.surpriseLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.underExposedLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.blurredLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.headwearLikelihood = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly"))
                                object.fdBoundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.fdBoundingPoly, options);
                            if (message.landmarks && message.landmarks.length) {
                                object.landmarks = [];
                                for (var j = 0; j < message.landmarks.length; ++j)
                                    object.landmarks[j] = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.toObject(message.landmarks[j], options);
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                object.rollAngle = options.json && !isFinite(message.rollAngle) ? String(message.rollAngle) : message.rollAngle;
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                object.panAngle = options.json && !isFinite(message.panAngle) ? String(message.panAngle) : message.panAngle;
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                object.tiltAngle = options.json && !isFinite(message.tiltAngle) ? String(message.tiltAngle) : message.tiltAngle;
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                object.detectionConfidence = options.json && !isFinite(message.detectionConfidence) ? String(message.detectionConfidence) : message.detectionConfidence;
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence;
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood;
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood;
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood;
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood;
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood;
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood;
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p2beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood;
                            return object;
                        };
    
                        /**
                         * Converts this FaceAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.FaceAnnotation";
                        };
    
                        FaceAnnotation.Landmark = (function() {
    
                            /**
                             * Properties of a Landmark.
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                             * @interface ILandmark
                             * @property {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type|null} [type] Landmark type
                             * @property {google.cloud.vision.v1p2beta1.IPosition|null} [position] Landmark position
                             */
    
                            /**
                             * Constructs a new Landmark.
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation
                             * @classdesc Represents a Landmark.
                             * @implements ILandmark
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             */
                            function Landmark(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Landmark type.
                             * @member {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type} type
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.type = 0;
    
                            /**
                             * Landmark position.
                             * @member {google.cloud.vision.v1p2beta1.IPosition|null|undefined} position
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.position = null;
    
                            /**
                             * Creates a new Landmark instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} Landmark instance
                             */
                            Landmark.create = function create(properties) {
                                return new Landmark(properties);
                            };
    
                            /**
                             * Encodes the specified Landmark message. Does not implicitly {@link google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                                if (message.position != null && Object.hasOwnProperty.call(message, "position"))
                                    $root.google.cloud.vision.v1p2beta1.Position.encode(message.position, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Landmark message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 3: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 4: {
                                            message.position = $root.google.cloud.vision.v1p2beta1.Position.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Landmark message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Landmark.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case 6:
                                    case 7:
                                    case 8:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                    case 33:
                                    case 34:
                                        break;
                                    }
                                if (message.position != null && message.hasOwnProperty("position")) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Position.verify(message.position);
                                    if (error)
                                        return "position." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a Landmark message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} Landmark
                             */
                            Landmark.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN_LANDMARK":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "LEFT_EYE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "RIGHT_EYE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "LEFT_OF_LEFT_EYEBROW":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "RIGHT_OF_LEFT_EYEBROW":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LEFT_OF_RIGHT_EYEBROW":
                                case 5:
                                    message.type = 5;
                                    break;
                                case "RIGHT_OF_RIGHT_EYEBROW":
                                case 6:
                                    message.type = 6;
                                    break;
                                case "MIDPOINT_BETWEEN_EYES":
                                case 7:
                                    message.type = 7;
                                    break;
                                case "NOSE_TIP":
                                case 8:
                                    message.type = 8;
                                    break;
                                case "UPPER_LIP":
                                case 9:
                                    message.type = 9;
                                    break;
                                case "LOWER_LIP":
                                case 10:
                                    message.type = 10;
                                    break;
                                case "MOUTH_LEFT":
                                case 11:
                                    message.type = 11;
                                    break;
                                case "MOUTH_RIGHT":
                                case 12:
                                    message.type = 12;
                                    break;
                                case "MOUTH_CENTER":
                                case 13:
                                    message.type = 13;
                                    break;
                                case "NOSE_BOTTOM_RIGHT":
                                case 14:
                                    message.type = 14;
                                    break;
                                case "NOSE_BOTTOM_LEFT":
                                case 15:
                                    message.type = 15;
                                    break;
                                case "NOSE_BOTTOM_CENTER":
                                case 16:
                                    message.type = 16;
                                    break;
                                case "LEFT_EYE_TOP_BOUNDARY":
                                case 17:
                                    message.type = 17;
                                    break;
                                case "LEFT_EYE_RIGHT_CORNER":
                                case 18:
                                    message.type = 18;
                                    break;
                                case "LEFT_EYE_BOTTOM_BOUNDARY":
                                case 19:
                                    message.type = 19;
                                    break;
                                case "LEFT_EYE_LEFT_CORNER":
                                case 20:
                                    message.type = 20;
                                    break;
                                case "RIGHT_EYE_TOP_BOUNDARY":
                                case 21:
                                    message.type = 21;
                                    break;
                                case "RIGHT_EYE_RIGHT_CORNER":
                                case 22:
                                    message.type = 22;
                                    break;
                                case "RIGHT_EYE_BOTTOM_BOUNDARY":
                                case 23:
                                    message.type = 23;
                                    break;
                                case "RIGHT_EYE_LEFT_CORNER":
                                case 24:
                                    message.type = 24;
                                    break;
                                case "LEFT_EYEBROW_UPPER_MIDPOINT":
                                case 25:
                                    message.type = 25;
                                    break;
                                case "RIGHT_EYEBROW_UPPER_MIDPOINT":
                                case 26:
                                    message.type = 26;
                                    break;
                                case "LEFT_EAR_TRAGION":
                                case 27:
                                    message.type = 27;
                                    break;
                                case "RIGHT_EAR_TRAGION":
                                case 28:
                                    message.type = 28;
                                    break;
                                case "LEFT_EYE_PUPIL":
                                case 29:
                                    message.type = 29;
                                    break;
                                case "RIGHT_EYE_PUPIL":
                                case 30:
                                    message.type = 30;
                                    break;
                                case "FOREHEAD_GLABELLA":
                                case 31:
                                    message.type = 31;
                                    break;
                                case "CHIN_GNATHION":
                                case 32:
                                    message.type = 32;
                                    break;
                                case "CHIN_LEFT_GONION":
                                case 33:
                                    message.type = 33;
                                    break;
                                case "CHIN_RIGHT_GONION":
                                case 34:
                                    message.type = 34;
                                    break;
                                }
                                if (object.position != null) {
                                    if (typeof object.position !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.position: object expected");
                                    message.position = $root.google.cloud.vision.v1p2beta1.Position.fromObject(object.position);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Landmark message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark} message Landmark
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Landmark.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN_LANDMARK" : 0;
                                    object.position = null;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type[message.type] : message.type;
                                if (message.position != null && message.hasOwnProperty("position"))
                                    object.position = $root.google.cloud.vision.v1p2beta1.Position.toObject(message.position, options);
                                return object;
                            };
    
                            /**
                             * Converts this Landmark to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Landmark.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Landmark
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Landmark.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark";
                            };
    
                            /**
                             * Type enum.
                             * @name google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Type
                             * @enum {number}
                             * @property {number} UNKNOWN_LANDMARK=0 UNKNOWN_LANDMARK value
                             * @property {number} LEFT_EYE=1 LEFT_EYE value
                             * @property {number} RIGHT_EYE=2 RIGHT_EYE value
                             * @property {number} LEFT_OF_LEFT_EYEBROW=3 LEFT_OF_LEFT_EYEBROW value
                             * @property {number} RIGHT_OF_LEFT_EYEBROW=4 RIGHT_OF_LEFT_EYEBROW value
                             * @property {number} LEFT_OF_RIGHT_EYEBROW=5 LEFT_OF_RIGHT_EYEBROW value
                             * @property {number} RIGHT_OF_RIGHT_EYEBROW=6 RIGHT_OF_RIGHT_EYEBROW value
                             * @property {number} MIDPOINT_BETWEEN_EYES=7 MIDPOINT_BETWEEN_EYES value
                             * @property {number} NOSE_TIP=8 NOSE_TIP value
                             * @property {number} UPPER_LIP=9 UPPER_LIP value
                             * @property {number} LOWER_LIP=10 LOWER_LIP value
                             * @property {number} MOUTH_LEFT=11 MOUTH_LEFT value
                             * @property {number} MOUTH_RIGHT=12 MOUTH_RIGHT value
                             * @property {number} MOUTH_CENTER=13 MOUTH_CENTER value
                             * @property {number} NOSE_BOTTOM_RIGHT=14 NOSE_BOTTOM_RIGHT value
                             * @property {number} NOSE_BOTTOM_LEFT=15 NOSE_BOTTOM_LEFT value
                             * @property {number} NOSE_BOTTOM_CENTER=16 NOSE_BOTTOM_CENTER value
                             * @property {number} LEFT_EYE_TOP_BOUNDARY=17 LEFT_EYE_TOP_BOUNDARY value
                             * @property {number} LEFT_EYE_RIGHT_CORNER=18 LEFT_EYE_RIGHT_CORNER value
                             * @property {number} LEFT_EYE_BOTTOM_BOUNDARY=19 LEFT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} LEFT_EYE_LEFT_CORNER=20 LEFT_EYE_LEFT_CORNER value
                             * @property {number} RIGHT_EYE_TOP_BOUNDARY=21 RIGHT_EYE_TOP_BOUNDARY value
                             * @property {number} RIGHT_EYE_RIGHT_CORNER=22 RIGHT_EYE_RIGHT_CORNER value
                             * @property {number} RIGHT_EYE_BOTTOM_BOUNDARY=23 RIGHT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} RIGHT_EYE_LEFT_CORNER=24 RIGHT_EYE_LEFT_CORNER value
                             * @property {number} LEFT_EYEBROW_UPPER_MIDPOINT=25 LEFT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} RIGHT_EYEBROW_UPPER_MIDPOINT=26 RIGHT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} LEFT_EAR_TRAGION=27 LEFT_EAR_TRAGION value
                             * @property {number} RIGHT_EAR_TRAGION=28 RIGHT_EAR_TRAGION value
                             * @property {number} LEFT_EYE_PUPIL=29 LEFT_EYE_PUPIL value
                             * @property {number} RIGHT_EYE_PUPIL=30 RIGHT_EYE_PUPIL value
                             * @property {number} FOREHEAD_GLABELLA=31 FOREHEAD_GLABELLA value
                             * @property {number} CHIN_GNATHION=32 CHIN_GNATHION value
                             * @property {number} CHIN_LEFT_GONION=33 CHIN_LEFT_GONION value
                             * @property {number} CHIN_RIGHT_GONION=34 CHIN_RIGHT_GONION value
                             */
                            Landmark.Type = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN_LANDMARK"] = 0;
                                values[valuesById[1] = "LEFT_EYE"] = 1;
                                values[valuesById[2] = "RIGHT_EYE"] = 2;
                                values[valuesById[3] = "LEFT_OF_LEFT_EYEBROW"] = 3;
                                values[valuesById[4] = "RIGHT_OF_LEFT_EYEBROW"] = 4;
                                values[valuesById[5] = "LEFT_OF_RIGHT_EYEBROW"] = 5;
                                values[valuesById[6] = "RIGHT_OF_RIGHT_EYEBROW"] = 6;
                                values[valuesById[7] = "MIDPOINT_BETWEEN_EYES"] = 7;
                                values[valuesById[8] = "NOSE_TIP"] = 8;
                                values[valuesById[9] = "UPPER_LIP"] = 9;
                                values[valuesById[10] = "LOWER_LIP"] = 10;
                                values[valuesById[11] = "MOUTH_LEFT"] = 11;
                                values[valuesById[12] = "MOUTH_RIGHT"] = 12;
                                values[valuesById[13] = "MOUTH_CENTER"] = 13;
                                values[valuesById[14] = "NOSE_BOTTOM_RIGHT"] = 14;
                                values[valuesById[15] = "NOSE_BOTTOM_LEFT"] = 15;
                                values[valuesById[16] = "NOSE_BOTTOM_CENTER"] = 16;
                                values[valuesById[17] = "LEFT_EYE_TOP_BOUNDARY"] = 17;
                                values[valuesById[18] = "LEFT_EYE_RIGHT_CORNER"] = 18;
                                values[valuesById[19] = "LEFT_EYE_BOTTOM_BOUNDARY"] = 19;
                                values[valuesById[20] = "LEFT_EYE_LEFT_CORNER"] = 20;
                                values[valuesById[21] = "RIGHT_EYE_TOP_BOUNDARY"] = 21;
                                values[valuesById[22] = "RIGHT_EYE_RIGHT_CORNER"] = 22;
                                values[valuesById[23] = "RIGHT_EYE_BOTTOM_BOUNDARY"] = 23;
                                values[valuesById[24] = "RIGHT_EYE_LEFT_CORNER"] = 24;
                                values[valuesById[25] = "LEFT_EYEBROW_UPPER_MIDPOINT"] = 25;
                                values[valuesById[26] = "RIGHT_EYEBROW_UPPER_MIDPOINT"] = 26;
                                values[valuesById[27] = "LEFT_EAR_TRAGION"] = 27;
                                values[valuesById[28] = "RIGHT_EAR_TRAGION"] = 28;
                                values[valuesById[29] = "LEFT_EYE_PUPIL"] = 29;
                                values[valuesById[30] = "RIGHT_EYE_PUPIL"] = 30;
                                values[valuesById[31] = "FOREHEAD_GLABELLA"] = 31;
                                values[valuesById[32] = "CHIN_GNATHION"] = 32;
                                values[valuesById[33] = "CHIN_LEFT_GONION"] = 33;
                                values[valuesById[34] = "CHIN_RIGHT_GONION"] = 34;
                                return values;
                            })();
    
                            return Landmark;
                        })();
    
                        return FaceAnnotation;
                    })();
    
                    v1p2beta1.LocationInfo = (function() {
    
                        /**
                         * Properties of a LocationInfo.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ILocationInfo
                         * @property {google.type.ILatLng|null} [latLng] LocationInfo latLng
                         */
    
                        /**
                         * Constructs a new LocationInfo.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a LocationInfo.
                         * @implements ILocationInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ILocationInfo=} [properties] Properties to set
                         */
                        function LocationInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocationInfo latLng.
                         * @member {google.type.ILatLng|null|undefined} latLng
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @instance
                         */
                        LocationInfo.prototype.latLng = null;
    
                        /**
                         * Creates a new LocationInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILocationInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.LocationInfo} LocationInfo instance
                         */
                        LocationInfo.create = function create(properties) {
                            return new LocationInfo(properties);
                        };
    
                        /**
                         * Encodes the specified LocationInfo message. Does not implicitly {@link google.cloud.vision.v1p2beta1.LocationInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
                                $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocationInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.LocationInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.LocationInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocationInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocationInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLng != null && message.hasOwnProperty("latLng")) {
                                var error = $root.google.type.LatLng.verify(message.latLng);
                                if (error)
                                    return "latLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocationInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.LocationInfo} LocationInfo
                         */
                        LocationInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.LocationInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.LocationInfo();
                            if (object.latLng != null) {
                                if (typeof object.latLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.LocationInfo.latLng: object expected");
                                message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocationInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.LocationInfo} message LocationInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocationInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.latLng = null;
                            if (message.latLng != null && message.hasOwnProperty("latLng"))
                                object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocationInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocationInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocationInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.LocationInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.LocationInfo";
                        };
    
                        return LocationInfo;
                    })();
    
                    v1p2beta1.Property = (function() {
    
                        /**
                         * Properties of a Property.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IProperty
                         * @property {string|null} [name] Property name
                         * @property {string|null} [value] Property value
                         * @property {number|Long|null} [uint64Value] Property uint64Value
                         */
    
                        /**
                         * Constructs a new Property.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Property.
                         * @implements IProperty
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IProperty=} [properties] Properties to set
                         */
                        function Property(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Property name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @instance
                         */
                        Property.prototype.name = "";
    
                        /**
                         * Property value.
                         * @member {string} value
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @instance
                         */
                        Property.prototype.value = "";
    
                        /**
                         * Property uint64Value.
                         * @member {number|Long} uint64Value
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @instance
                         */
                        Property.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                        /**
                         * Creates a new Property instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IProperty=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Property} Property instance
                         */
                        Property.create = function create(properties) {
                            return new Property(properties);
                        };
    
                        /**
                         * Encodes the specified Property message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Property.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                            if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Property.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Property();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.value = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.uint64Value = reader.uint64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Property message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Property.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.value != null && message.hasOwnProperty("value"))
                                if (!$util.isString(message.value))
                                    return "value: string expected";
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high)))
                                    return "uint64Value: integer|Long expected";
                            return null;
                        };
    
                        /**
                         * Creates a Property message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Property} Property
                         */
                        Property.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Property)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Property();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.value != null)
                                message.value = String(object.value);
                            if (object.uint64Value != null)
                                if ($util.Long)
                                    (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true;
                                else if (typeof object.uint64Value === "string")
                                    message.uint64Value = parseInt(object.uint64Value, 10);
                                else if (typeof object.uint64Value === "number")
                                    message.uint64Value = object.uint64Value;
                                else if (typeof object.uint64Value === "object")
                                    message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Property message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Property} message Property
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Property.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.value = "";
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, true);
                                    object.uint64Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.uint64Value = options.longs === String ? "0" : 0;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.value != null && message.hasOwnProperty("value"))
                                object.value = message.value;
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (typeof message.uint64Value === "number")
                                    object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value;
                                else
                                    object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value;
                            return object;
                        };
    
                        /**
                         * Converts this Property to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Property.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Property
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Property
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Property";
                        };
    
                        return Property;
                    })();
    
                    v1p2beta1.EntityAnnotation = (function() {
    
                        /**
                         * Properties of an EntityAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IEntityAnnotation
                         * @property {string|null} [mid] EntityAnnotation mid
                         * @property {string|null} [locale] EntityAnnotation locale
                         * @property {string|null} [description] EntityAnnotation description
                         * @property {number|null} [score] EntityAnnotation score
                         * @property {number|null} [confidence] EntityAnnotation confidence
                         * @property {number|null} [topicality] EntityAnnotation topicality
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingPoly] EntityAnnotation boundingPoly
                         * @property {Array.<google.cloud.vision.v1p2beta1.ILocationInfo>|null} [locations] EntityAnnotation locations
                         * @property {Array.<google.cloud.vision.v1p2beta1.IProperty>|null} [properties] EntityAnnotation properties
                         */
    
                        /**
                         * Constructs a new EntityAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an EntityAnnotation.
                         * @implements IEntityAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IEntityAnnotation=} [properties] Properties to set
                         */
                        function EntityAnnotation(properties) {
                            this.locations = [];
                            this.properties = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * EntityAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.mid = "";
    
                        /**
                         * EntityAnnotation locale.
                         * @member {string} locale
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locale = "";
    
                        /**
                         * EntityAnnotation description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.description = "";
    
                        /**
                         * EntityAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.score = 0;
    
                        /**
                         * EntityAnnotation confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.confidence = 0;
    
                        /**
                         * EntityAnnotation topicality.
                         * @member {number} topicality
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.topicality = 0;
    
                        /**
                         * EntityAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * EntityAnnotation locations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.ILocationInfo>} locations
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locations = $util.emptyArray;
    
                        /**
                         * EntityAnnotation properties.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IProperty>} properties
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.properties = $util.emptyArray;
    
                        /**
                         * Creates a new EntityAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IEntityAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.EntityAnnotation} EntityAnnotation instance
                         */
                        EntityAnnotation.create = function create(properties) {
                            return new EntityAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.EntityAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.locale != null && Object.hasOwnProperty.call(message, "locale"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.locale);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            if (message.topicality != null && Object.hasOwnProperty.call(message, "topicality"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.topicality);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                            if (message.locations != null && message.locations.length)
                                for (var i = 0; i < message.locations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.LocationInfo.encode(message.locations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.properties != null && message.properties.length)
                                for (var i = 0; i < message.properties.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Property.encode(message.properties[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.EntityAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.EntityAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.locale = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.topicality = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        if (!(message.locations && message.locations.length))
                                            message.locations = [];
                                        message.locations.push($root.google.cloud.vision.v1p2beta1.LocationInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 9: {
                                        if (!(message.properties && message.properties.length))
                                            message.properties = [];
                                        message.properties.push($root.google.cloud.vision.v1p2beta1.Property.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an EntityAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        EntityAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                if (!$util.isString(message.locale))
                                    return "locale: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                if (typeof message.topicality !== "number")
                                    return "topicality: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.locations != null && message.hasOwnProperty("locations")) {
                                if (!Array.isArray(message.locations))
                                    return "locations: array expected";
                                for (var i = 0; i < message.locations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.LocationInfo.verify(message.locations[i]);
                                    if (error)
                                        return "locations." + error;
                                }
                            }
                            if (message.properties != null && message.hasOwnProperty("properties")) {
                                if (!Array.isArray(message.properties))
                                    return "properties: array expected";
                                for (var i = 0; i < message.properties.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Property.verify(message.properties[i]);
                                    if (error)
                                        return "properties." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an EntityAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.EntityAnnotation} EntityAnnotation
                         */
                        EntityAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.EntityAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.EntityAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.locale != null)
                                message.locale = String(object.locale);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.topicality != null)
                                message.topicality = Number(object.topicality);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.EntityAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.locations) {
                                if (!Array.isArray(object.locations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.EntityAnnotation.locations: array expected");
                                message.locations = [];
                                for (var i = 0; i < object.locations.length; ++i) {
                                    if (typeof object.locations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.EntityAnnotation.locations: object expected");
                                    message.locations[i] = $root.google.cloud.vision.v1p2beta1.LocationInfo.fromObject(object.locations[i]);
                                }
                            }
                            if (object.properties) {
                                if (!Array.isArray(object.properties))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.EntityAnnotation.properties: array expected");
                                message.properties = [];
                                for (var i = 0; i < object.properties.length; ++i) {
                                    if (typeof object.properties[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.EntityAnnotation.properties: object expected");
                                    message.properties[i] = $root.google.cloud.vision.v1p2beta1.Property.fromObject(object.properties[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an EntityAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.EntityAnnotation} message EntityAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        EntityAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.locations = [];
                                object.properties = [];
                            }
                            if (options.defaults) {
                                object.mid = "";
                                object.locale = "";
                                object.description = "";
                                object.score = 0;
                                object.confidence = 0;
                                object.topicality = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                object.locale = message.locale;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                object.topicality = options.json && !isFinite(message.topicality) ? String(message.topicality) : message.topicality;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.locations && message.locations.length) {
                                object.locations = [];
                                for (var j = 0; j < message.locations.length; ++j)
                                    object.locations[j] = $root.google.cloud.vision.v1p2beta1.LocationInfo.toObject(message.locations[j], options);
                            }
                            if (message.properties && message.properties.length) {
                                object.properties = [];
                                for (var j = 0; j < message.properties.length; ++j)
                                    object.properties[j] = $root.google.cloud.vision.v1p2beta1.Property.toObject(message.properties[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this EntityAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        EntityAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for EntityAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.EntityAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        EntityAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.EntityAnnotation";
                        };
    
                        return EntityAnnotation;
                    })();
    
                    v1p2beta1.SafeSearchAnnotation = (function() {
    
                        /**
                         * Properties of a SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ISafeSearchAnnotation
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [adult] SafeSearchAnnotation adult
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [spoof] SafeSearchAnnotation spoof
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [medical] SafeSearchAnnotation medical
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [violence] SafeSearchAnnotation violence
                         * @property {google.cloud.vision.v1p2beta1.Likelihood|null} [racy] SafeSearchAnnotation racy
                         */
    
                        /**
                         * Constructs a new SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a SafeSearchAnnotation.
                         * @implements ISafeSearchAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         */
                        function SafeSearchAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * SafeSearchAnnotation adult.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} adult
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.adult = 0;
    
                        /**
                         * SafeSearchAnnotation spoof.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} spoof
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.spoof = 0;
    
                        /**
                         * SafeSearchAnnotation medical.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} medical
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.medical = 0;
    
                        /**
                         * SafeSearchAnnotation violence.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} violence
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.violence = 0;
    
                        /**
                         * SafeSearchAnnotation racy.
                         * @member {google.cloud.vision.v1p2beta1.Likelihood} racy
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.racy = 0;
    
                        /**
                         * Creates a new SafeSearchAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.SafeSearchAnnotation} SafeSearchAnnotation instance
                         */
                        SafeSearchAnnotation.create = function create(properties) {
                            return new SafeSearchAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.adult != null && Object.hasOwnProperty.call(message, "adult"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adult);
                            if (message.spoof != null && Object.hasOwnProperty.call(message, "spoof"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.spoof);
                            if (message.medical != null && Object.hasOwnProperty.call(message, "medical"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.medical);
                            if (message.violence != null && Object.hasOwnProperty.call(message, "violence"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.violence);
                            if (message.racy != null && Object.hasOwnProperty.call(message, "racy"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.racy);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.adult = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.spoof = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.medical = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.violence = reader.int32();
                                        break;
                                    }
                                case 9: {
                                        message.racy = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a SafeSearchAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        SafeSearchAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                switch (message.adult) {
                                default:
                                    return "adult: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                switch (message.spoof) {
                                default:
                                    return "spoof: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                switch (message.medical) {
                                default:
                                    return "medical: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                switch (message.violence) {
                                default:
                                    return "violence: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                switch (message.racy) {
                                default:
                                    return "racy: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a SafeSearchAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         */
                        SafeSearchAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation();
                            switch (object.adult) {
                            default:
                                if (typeof object.adult === "number") {
                                    message.adult = object.adult;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.adult = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.adult = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.adult = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.adult = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.adult = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.adult = 5;
                                break;
                            }
                            switch (object.spoof) {
                            default:
                                if (typeof object.spoof === "number") {
                                    message.spoof = object.spoof;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.spoof = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.spoof = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.spoof = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.spoof = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.spoof = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.spoof = 5;
                                break;
                            }
                            switch (object.medical) {
                            default:
                                if (typeof object.medical === "number") {
                                    message.medical = object.medical;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.medical = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.medical = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.medical = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.medical = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.medical = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.medical = 5;
                                break;
                            }
                            switch (object.violence) {
                            default:
                                if (typeof object.violence === "number") {
                                    message.violence = object.violence;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.violence = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.violence = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.violence = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.violence = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.violence = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.violence = 5;
                                break;
                            }
                            switch (object.racy) {
                            default:
                                if (typeof object.racy === "number") {
                                    message.racy = object.racy;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.racy = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.racy = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.racy = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.racy = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.racy = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.racy = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a SafeSearchAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.SafeSearchAnnotation} message SafeSearchAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        SafeSearchAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.adult = options.enums === String ? "UNKNOWN" : 0;
                                object.spoof = options.enums === String ? "UNKNOWN" : 0;
                                object.medical = options.enums === String ? "UNKNOWN" : 0;
                                object.violence = options.enums === String ? "UNKNOWN" : 0;
                                object.racy = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                object.adult = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p2beta1.Likelihood[message.adult] : message.adult;
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                object.spoof = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p2beta1.Likelihood[message.spoof] : message.spoof;
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                object.medical = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p2beta1.Likelihood[message.medical] : message.medical;
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                object.violence = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p2beta1.Likelihood[message.violence] : message.violence;
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                object.racy = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p2beta1.Likelihood[message.racy] : message.racy;
                            return object;
                        };
    
                        /**
                         * Converts this SafeSearchAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        SafeSearchAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for SafeSearchAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.SafeSearchAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        SafeSearchAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.SafeSearchAnnotation";
                        };
    
                        return SafeSearchAnnotation;
                    })();
    
                    v1p2beta1.LatLongRect = (function() {
    
                        /**
                         * Properties of a LatLongRect.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ILatLongRect
                         * @property {google.type.ILatLng|null} [minLatLng] LatLongRect minLatLng
                         * @property {google.type.ILatLng|null} [maxLatLng] LatLongRect maxLatLng
                         */
    
                        /**
                         * Constructs a new LatLongRect.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a LatLongRect.
                         * @implements ILatLongRect
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ILatLongRect=} [properties] Properties to set
                         */
                        function LatLongRect(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LatLongRect minLatLng.
                         * @member {google.type.ILatLng|null|undefined} minLatLng
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.minLatLng = null;
    
                        /**
                         * LatLongRect maxLatLng.
                         * @member {google.type.ILatLng|null|undefined} maxLatLng
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.maxLatLng = null;
    
                        /**
                         * Creates a new LatLongRect instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILatLongRect=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.LatLongRect} LatLongRect instance
                         */
                        LatLongRect.create = function create(properties) {
                            return new LatLongRect(properties);
                        };
    
                        /**
                         * Encodes the specified LatLongRect message. Does not implicitly {@link google.cloud.vision.v1p2beta1.LatLongRect.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.minLatLng != null && Object.hasOwnProperty.call(message, "minLatLng"))
                                $root.google.type.LatLng.encode(message.minLatLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.maxLatLng != null && Object.hasOwnProperty.call(message, "maxLatLng"))
                                $root.google.type.LatLng.encode(message.maxLatLng, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LatLongRect message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.LatLongRect.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.LatLongRect();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.minLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.maxLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LatLongRect message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LatLongRect.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.minLatLng);
                                if (error)
                                    return "minLatLng." + error;
                            }
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.maxLatLng);
                                if (error)
                                    return "maxLatLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LatLongRect message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.LatLongRect} LatLongRect
                         */
                        LatLongRect.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.LatLongRect)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.LatLongRect();
                            if (object.minLatLng != null) {
                                if (typeof object.minLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.LatLongRect.minLatLng: object expected");
                                message.minLatLng = $root.google.type.LatLng.fromObject(object.minLatLng);
                            }
                            if (object.maxLatLng != null) {
                                if (typeof object.maxLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.LatLongRect.maxLatLng: object expected");
                                message.maxLatLng = $root.google.type.LatLng.fromObject(object.maxLatLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LatLongRect message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.LatLongRect} message LatLongRect
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LatLongRect.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.minLatLng = null;
                                object.maxLatLng = null;
                            }
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng"))
                                object.minLatLng = $root.google.type.LatLng.toObject(message.minLatLng, options);
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng"))
                                object.maxLatLng = $root.google.type.LatLng.toObject(message.maxLatLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LatLongRect to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LatLongRect.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LatLongRect
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.LatLongRect
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LatLongRect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.LatLongRect";
                        };
    
                        return LatLongRect;
                    })();
    
                    v1p2beta1.ColorInfo = (function() {
    
                        /**
                         * Properties of a ColorInfo.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IColorInfo
                         * @property {google.type.IColor|null} [color] ColorInfo color
                         * @property {number|null} [score] ColorInfo score
                         * @property {number|null} [pixelFraction] ColorInfo pixelFraction
                         */
    
                        /**
                         * Constructs a new ColorInfo.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a ColorInfo.
                         * @implements IColorInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IColorInfo=} [properties] Properties to set
                         */
                        function ColorInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ColorInfo color.
                         * @member {google.type.IColor|null|undefined} color
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.color = null;
    
                        /**
                         * ColorInfo score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.score = 0;
    
                        /**
                         * ColorInfo pixelFraction.
                         * @member {number} pixelFraction
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.pixelFraction = 0;
    
                        /**
                         * Creates a new ColorInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IColorInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.ColorInfo} ColorInfo instance
                         */
                        ColorInfo.create = function create(properties) {
                            return new ColorInfo(properties);
                        };
    
                        /**
                         * Encodes the specified ColorInfo message. Does not implicitly {@link google.cloud.vision.v1p2beta1.ColorInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.color != null && Object.hasOwnProperty.call(message, "color"))
                                $root.google.type.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                            if (message.pixelFraction != null && Object.hasOwnProperty.call(message, "pixelFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.pixelFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ColorInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.ColorInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.ColorInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.color = $root.google.type.Color.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.pixelFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ColorInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ColorInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.color != null && message.hasOwnProperty("color")) {
                                var error = $root.google.type.Color.verify(message.color);
                                if (error)
                                    return "color." + error;
                            }
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                if (typeof message.pixelFraction !== "number")
                                    return "pixelFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a ColorInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.ColorInfo} ColorInfo
                         */
                        ColorInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.ColorInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.ColorInfo();
                            if (object.color != null) {
                                if (typeof object.color !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ColorInfo.color: object expected");
                                message.color = $root.google.type.Color.fromObject(object.color);
                            }
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.pixelFraction != null)
                                message.pixelFraction = Number(object.pixelFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ColorInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ColorInfo} message ColorInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ColorInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.color = null;
                                object.score = 0;
                                object.pixelFraction = 0;
                            }
                            if (message.color != null && message.hasOwnProperty("color"))
                                object.color = $root.google.type.Color.toObject(message.color, options);
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                object.pixelFraction = options.json && !isFinite(message.pixelFraction) ? String(message.pixelFraction) : message.pixelFraction;
                            return object;
                        };
    
                        /**
                         * Converts this ColorInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ColorInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ColorInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.ColorInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ColorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.ColorInfo";
                        };
    
                        return ColorInfo;
                    })();
    
                    v1p2beta1.DominantColorsAnnotation = (function() {
    
                        /**
                         * Properties of a DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IDominantColorsAnnotation
                         * @property {Array.<google.cloud.vision.v1p2beta1.IColorInfo>|null} [colors] DominantColorsAnnotation colors
                         */
    
                        /**
                         * Constructs a new DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a DominantColorsAnnotation.
                         * @implements IDominantColorsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         */
                        function DominantColorsAnnotation(properties) {
                            this.colors = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DominantColorsAnnotation colors.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IColorInfo>} colors
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @instance
                         */
                        DominantColorsAnnotation.prototype.colors = $util.emptyArray;
    
                        /**
                         * Creates a new DominantColorsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.DominantColorsAnnotation} DominantColorsAnnotation instance
                         */
                        DominantColorsAnnotation.create = function create(properties) {
                            return new DominantColorsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.colors != null && message.colors.length)
                                for (var i = 0; i < message.colors.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.ColorInfo.encode(message.colors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.colors && message.colors.length))
                                            message.colors = [];
                                        message.colors.push($root.google.cloud.vision.v1p2beta1.ColorInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DominantColorsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DominantColorsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.colors != null && message.hasOwnProperty("colors")) {
                                if (!Array.isArray(message.colors))
                                    return "colors: array expected";
                                for (var i = 0; i < message.colors.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.ColorInfo.verify(message.colors[i]);
                                    if (error)
                                        return "colors." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a DominantColorsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         */
                        DominantColorsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation();
                            if (object.colors) {
                                if (!Array.isArray(object.colors))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.DominantColorsAnnotation.colors: array expected");
                                message.colors = [];
                                for (var i = 0; i < object.colors.length; ++i) {
                                    if (typeof object.colors[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.DominantColorsAnnotation.colors: object expected");
                                    message.colors[i] = $root.google.cloud.vision.v1p2beta1.ColorInfo.fromObject(object.colors[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DominantColorsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.DominantColorsAnnotation} message DominantColorsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DominantColorsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.colors = [];
                            if (message.colors && message.colors.length) {
                                object.colors = [];
                                for (var j = 0; j < message.colors.length; ++j)
                                    object.colors[j] = $root.google.cloud.vision.v1p2beta1.ColorInfo.toObject(message.colors[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this DominantColorsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DominantColorsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DominantColorsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.DominantColorsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DominantColorsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.DominantColorsAnnotation";
                        };
    
                        return DominantColorsAnnotation;
                    })();
    
                    v1p2beta1.ImageProperties = (function() {
    
                        /**
                         * Properties of an ImageProperties.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IImageProperties
                         * @property {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation|null} [dominantColors] ImageProperties dominantColors
                         */
    
                        /**
                         * Constructs a new ImageProperties.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an ImageProperties.
                         * @implements IImageProperties
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IImageProperties=} [properties] Properties to set
                         */
                        function ImageProperties(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageProperties dominantColors.
                         * @member {google.cloud.vision.v1p2beta1.IDominantColorsAnnotation|null|undefined} dominantColors
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @instance
                         */
                        ImageProperties.prototype.dominantColors = null;
    
                        /**
                         * Creates a new ImageProperties instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageProperties=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.ImageProperties} ImageProperties instance
                         */
                        ImageProperties.create = function create(properties) {
                            return new ImageProperties(properties);
                        };
    
                        /**
                         * Encodes the specified ImageProperties message. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageProperties.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dominantColors != null && Object.hasOwnProperty.call(message, "dominantColors"))
                                $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.encode(message.dominantColors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageProperties message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageProperties.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.ImageProperties();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dominantColors = $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageProperties message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageProperties.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors")) {
                                var error = $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.verify(message.dominantColors);
                                if (error)
                                    return "dominantColors." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageProperties message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.ImageProperties} ImageProperties
                         */
                        ImageProperties.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.ImageProperties)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.ImageProperties();
                            if (object.dominantColors != null) {
                                if (typeof object.dominantColors !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageProperties.dominantColors: object expected");
                                message.dominantColors = $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.fromObject(object.dominantColors);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageProperties message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ImageProperties} message ImageProperties
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageProperties.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.dominantColors = null;
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors"))
                                object.dominantColors = $root.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.toObject(message.dominantColors, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageProperties to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageProperties.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageProperties
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.ImageProperties
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.ImageProperties";
                        };
    
                        return ImageProperties;
                    })();
    
                    v1p2beta1.CropHint = (function() {
    
                        /**
                         * Properties of a CropHint.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ICropHint
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingPoly] CropHint boundingPoly
                         * @property {number|null} [confidence] CropHint confidence
                         * @property {number|null} [importanceFraction] CropHint importanceFraction
                         */
    
                        /**
                         * Constructs a new CropHint.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a CropHint.
                         * @implements ICropHint
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ICropHint=} [properties] Properties to set
                         */
                        function CropHint(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHint boundingPoly.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.boundingPoly = null;
    
                        /**
                         * CropHint confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.confidence = 0;
    
                        /**
                         * CropHint importanceFraction.
                         * @member {number} importanceFraction
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.importanceFraction = 0;
    
                        /**
                         * Creates a new CropHint instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHint=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.CropHint} CropHint instance
                         */
                        CropHint.create = function create(properties) {
                            return new CropHint(properties);
                        };
    
                        /**
                         * Encodes the specified CropHint message. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHint.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            if (message.importanceFraction != null && Object.hasOwnProperty.call(message, "importanceFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.importanceFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHint message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHint.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.CropHint();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.importanceFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHint message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHint.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                if (typeof message.importanceFraction !== "number")
                                    return "importanceFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a CropHint message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.CropHint} CropHint
                         */
                        CropHint.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.CropHint)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.CropHint();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.CropHint.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.importanceFraction != null)
                                message.importanceFraction = Number(object.importanceFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHint message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.CropHint} message CropHint
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHint.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.confidence = 0;
                                object.importanceFraction = 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                object.importanceFraction = options.json && !isFinite(message.importanceFraction) ? String(message.importanceFraction) : message.importanceFraction;
                            return object;
                        };
    
                        /**
                         * Converts this CropHint to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHint.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHint
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.CropHint
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.CropHint";
                        };
    
                        return CropHint;
                    })();
    
                    v1p2beta1.CropHintsAnnotation = (function() {
    
                        /**
                         * Properties of a CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ICropHintsAnnotation
                         * @property {Array.<google.cloud.vision.v1p2beta1.ICropHint>|null} [cropHints] CropHintsAnnotation cropHints
                         */
    
                        /**
                         * Constructs a new CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a CropHintsAnnotation.
                         * @implements ICropHintsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsAnnotation=} [properties] Properties to set
                         */
                        function CropHintsAnnotation(properties) {
                            this.cropHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsAnnotation cropHints.
                         * @member {Array.<google.cloud.vision.v1p2beta1.ICropHint>} cropHints
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @instance
                         */
                        CropHintsAnnotation.prototype.cropHints = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsAnnotation} CropHintsAnnotation instance
                         */
                        CropHintsAnnotation.create = function create(properties) {
                            return new CropHintsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.cropHints != null && message.cropHints.length)
                                for (var i = 0; i < message.cropHints.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.CropHint.encode(message.cropHints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.cropHints && message.cropHints.length))
                                            message.cropHints = [];
                                        message.cropHints.push($root.google.cloud.vision.v1p2beta1.CropHint.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.cropHints != null && message.hasOwnProperty("cropHints")) {
                                if (!Array.isArray(message.cropHints))
                                    return "cropHints: array expected";
                                for (var i = 0; i < message.cropHints.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.CropHint.verify(message.cropHints[i]);
                                    if (error)
                                        return "cropHints." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsAnnotation} CropHintsAnnotation
                         */
                        CropHintsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation();
                            if (object.cropHints) {
                                if (!Array.isArray(object.cropHints))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.CropHintsAnnotation.cropHints: array expected");
                                message.cropHints = [];
                                for (var i = 0; i < object.cropHints.length; ++i) {
                                    if (typeof object.cropHints[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.CropHintsAnnotation.cropHints: object expected");
                                    message.cropHints[i] = $root.google.cloud.vision.v1p2beta1.CropHint.fromObject(object.cropHints[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.CropHintsAnnotation} message CropHintsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.cropHints = [];
                            if (message.cropHints && message.cropHints.length) {
                                object.cropHints = [];
                                for (var j = 0; j < message.cropHints.length; ++j)
                                    object.cropHints[j] = $root.google.cloud.vision.v1p2beta1.CropHint.toObject(message.cropHints[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.CropHintsAnnotation";
                        };
    
                        return CropHintsAnnotation;
                    })();
    
                    v1p2beta1.CropHintsParams = (function() {
    
                        /**
                         * Properties of a CropHintsParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ICropHintsParams
                         * @property {Array.<number>|null} [aspectRatios] CropHintsParams aspectRatios
                         */
    
                        /**
                         * Constructs a new CropHintsParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a CropHintsParams.
                         * @implements ICropHintsParams
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsParams=} [properties] Properties to set
                         */
                        function CropHintsParams(properties) {
                            this.aspectRatios = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsParams aspectRatios.
                         * @member {Array.<number>} aspectRatios
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @instance
                         */
                        CropHintsParams.prototype.aspectRatios = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsParams} CropHintsParams instance
                         */
                        CropHintsParams.create = function create(properties) {
                            return new CropHintsParams(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHintsParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.aspectRatios != null && message.aspectRatios.length) {
                                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    writer.float(message.aspectRatios[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.CropHintsParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.CropHintsParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.aspectRatios && message.aspectRatios.length))
                                            message.aspectRatios = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.aspectRatios.push(reader.float());
                                        } else
                                            message.aspectRatios.push(reader.float());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.aspectRatios != null && message.hasOwnProperty("aspectRatios")) {
                                if (!Array.isArray(message.aspectRatios))
                                    return "aspectRatios: array expected";
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    if (typeof message.aspectRatios[i] !== "number")
                                        return "aspectRatios: number[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.CropHintsParams} CropHintsParams
                         */
                        CropHintsParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.CropHintsParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.CropHintsParams();
                            if (object.aspectRatios) {
                                if (!Array.isArray(object.aspectRatios))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.CropHintsParams.aspectRatios: array expected");
                                message.aspectRatios = [];
                                for (var i = 0; i < object.aspectRatios.length; ++i)
                                    message.aspectRatios[i] = Number(object.aspectRatios[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.CropHintsParams} message CropHintsParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.aspectRatios = [];
                            if (message.aspectRatios && message.aspectRatios.length) {
                                object.aspectRatios = [];
                                for (var j = 0; j < message.aspectRatios.length; ++j)
                                    object.aspectRatios[j] = options.json && !isFinite(message.aspectRatios[j]) ? String(message.aspectRatios[j]) : message.aspectRatios[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.CropHintsParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.CropHintsParams";
                        };
    
                        return CropHintsParams;
                    })();
    
                    v1p2beta1.WebDetectionParams = (function() {
    
                        /**
                         * Properties of a WebDetectionParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IWebDetectionParams
                         * @property {boolean|null} [includeGeoResults] WebDetectionParams includeGeoResults
                         */
    
                        /**
                         * Constructs a new WebDetectionParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a WebDetectionParams.
                         * @implements IWebDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IWebDetectionParams=} [properties] Properties to set
                         */
                        function WebDetectionParams(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetectionParams includeGeoResults.
                         * @member {boolean} includeGeoResults
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @instance
                         */
                        WebDetectionParams.prototype.includeGeoResults = false;
    
                        /**
                         * Creates a new WebDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.WebDetectionParams} WebDetectionParams instance
                         */
                        WebDetectionParams.create = function create(properties) {
                            return new WebDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.includeGeoResults != null && Object.hasOwnProperty.call(message, "includeGeoResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeGeoResults);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.includeGeoResults = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                if (typeof message.includeGeoResults !== "boolean")
                                    return "includeGeoResults: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a WebDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.WebDetectionParams} WebDetectionParams
                         */
                        WebDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.WebDetectionParams();
                            if (object.includeGeoResults != null)
                                message.includeGeoResults = Boolean(object.includeGeoResults);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.WebDetectionParams} message WebDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.includeGeoResults = false;
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                object.includeGeoResults = message.includeGeoResults;
                            return object;
                        };
    
                        /**
                         * Converts this WebDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.WebDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetectionParams";
                        };
    
                        return WebDetectionParams;
                    })();
    
                    v1p2beta1.TextDetectionParams = (function() {
    
                        /**
                         * Properties of a TextDetectionParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ITextDetectionParams
                         * @property {boolean|null} [enableTextDetectionConfidenceScore] TextDetectionParams enableTextDetectionConfidenceScore
                         * @property {Array.<string>|null} [advancedOcrOptions] TextDetectionParams advancedOcrOptions
                         */
    
                        /**
                         * Constructs a new TextDetectionParams.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a TextDetectionParams.
                         * @implements ITextDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ITextDetectionParams=} [properties] Properties to set
                         */
                        function TextDetectionParams(properties) {
                            this.advancedOcrOptions = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextDetectionParams enableTextDetectionConfidenceScore.
                         * @member {boolean} enableTextDetectionConfidenceScore
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.enableTextDetectionConfidenceScore = false;
    
                        /**
                         * TextDetectionParams advancedOcrOptions.
                         * @member {Array.<string>} advancedOcrOptions
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.advancedOcrOptions = $util.emptyArray;
    
                        /**
                         * Creates a new TextDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.TextDetectionParams} TextDetectionParams instance
                         */
                        TextDetectionParams.create = function create(properties) {
                            return new TextDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.enableTextDetectionConfidenceScore != null && Object.hasOwnProperty.call(message, "enableTextDetectionConfidenceScore"))
                                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enableTextDetectionConfidenceScore);
                            if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.advancedOcrOptions[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.TextDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.enableTextDetectionConfidenceScore = reader.bool();
                                        break;
                                    }
                                case 11: {
                                        if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
                                            message.advancedOcrOptions = [];
                                        message.advancedOcrOptions.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                if (typeof message.enableTextDetectionConfidenceScore !== "boolean")
                                    return "enableTextDetectionConfidenceScore: boolean expected";
                            if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
                                if (!Array.isArray(message.advancedOcrOptions))
                                    return "advancedOcrOptions: array expected";
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    if (!$util.isString(message.advancedOcrOptions[i]))
                                        return "advancedOcrOptions: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a TextDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.TextDetectionParams} TextDetectionParams
                         */
                        TextDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.TextDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.TextDetectionParams();
                            if (object.enableTextDetectionConfidenceScore != null)
                                message.enableTextDetectionConfidenceScore = Boolean(object.enableTextDetectionConfidenceScore);
                            if (object.advancedOcrOptions) {
                                if (!Array.isArray(object.advancedOcrOptions))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.TextDetectionParams.advancedOcrOptions: array expected");
                                message.advancedOcrOptions = [];
                                for (var i = 0; i < object.advancedOcrOptions.length; ++i)
                                    message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.TextDetectionParams} message TextDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.advancedOcrOptions = [];
                            if (options.defaults)
                                object.enableTextDetectionConfidenceScore = false;
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                object.enableTextDetectionConfidenceScore = message.enableTextDetectionConfidenceScore;
                            if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
                                object.advancedOcrOptions = [];
                                for (var j = 0; j < message.advancedOcrOptions.length; ++j)
                                    object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this TextDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.TextDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.TextDetectionParams";
                        };
    
                        return TextDetectionParams;
                    })();
    
                    v1p2beta1.ImageContext = (function() {
    
                        /**
                         * Properties of an ImageContext.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IImageContext
                         * @property {google.cloud.vision.v1p2beta1.ILatLongRect|null} [latLongRect] ImageContext latLongRect
                         * @property {Array.<string>|null} [languageHints] ImageContext languageHints
                         * @property {google.cloud.vision.v1p2beta1.ICropHintsParams|null} [cropHintsParams] ImageContext cropHintsParams
                         * @property {google.cloud.vision.v1p2beta1.IWebDetectionParams|null} [webDetectionParams] ImageContext webDetectionParams
                         * @property {google.cloud.vision.v1p2beta1.ITextDetectionParams|null} [textDetectionParams] ImageContext textDetectionParams
                         */
    
                        /**
                         * Constructs a new ImageContext.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an ImageContext.
                         * @implements IImageContext
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IImageContext=} [properties] Properties to set
                         */
                        function ImageContext(properties) {
                            this.languageHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageContext latLongRect.
                         * @member {google.cloud.vision.v1p2beta1.ILatLongRect|null|undefined} latLongRect
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.latLongRect = null;
    
                        /**
                         * ImageContext languageHints.
                         * @member {Array.<string>} languageHints
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.languageHints = $util.emptyArray;
    
                        /**
                         * ImageContext cropHintsParams.
                         * @member {google.cloud.vision.v1p2beta1.ICropHintsParams|null|undefined} cropHintsParams
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.cropHintsParams = null;
    
                        /**
                         * ImageContext webDetectionParams.
                         * @member {google.cloud.vision.v1p2beta1.IWebDetectionParams|null|undefined} webDetectionParams
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.webDetectionParams = null;
    
                        /**
                         * ImageContext textDetectionParams.
                         * @member {google.cloud.vision.v1p2beta1.ITextDetectionParams|null|undefined} textDetectionParams
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.textDetectionParams = null;
    
                        /**
                         * Creates a new ImageContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.ImageContext} ImageContext instance
                         */
                        ImageContext.create = function create(properties) {
                            return new ImageContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageContext message. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLongRect != null && Object.hasOwnProperty.call(message, "latLongRect"))
                                $root.google.cloud.vision.v1p2beta1.LatLongRect.encode(message.latLongRect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.languageHints != null && message.languageHints.length)
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageHints[i]);
                            if (message.cropHintsParams != null && Object.hasOwnProperty.call(message, "cropHintsParams"))
                                $root.google.cloud.vision.v1p2beta1.CropHintsParams.encode(message.cropHintsParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.webDetectionParams != null && Object.hasOwnProperty.call(message, "webDetectionParams"))
                                $root.google.cloud.vision.v1p2beta1.WebDetectionParams.encode(message.webDetectionParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.textDetectionParams != null && Object.hasOwnProperty.call(message, "textDetectionParams"))
                                $root.google.cloud.vision.v1p2beta1.TextDetectionParams.encode(message.textDetectionParams, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.ImageContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLongRect = $root.google.cloud.vision.v1p2beta1.LatLongRect.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.languageHints && message.languageHints.length))
                                            message.languageHints = [];
                                        message.languageHints.push(reader.string());
                                        break;
                                    }
                                case 4: {
                                        message.cropHintsParams = $root.google.cloud.vision.v1p2beta1.CropHintsParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.webDetectionParams = $root.google.cloud.vision.v1p2beta1.WebDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 12: {
                                        message.textDetectionParams = $root.google.cloud.vision.v1p2beta1.TextDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect")) {
                                var error = $root.google.cloud.vision.v1p2beta1.LatLongRect.verify(message.latLongRect);
                                if (error)
                                    return "latLongRect." + error;
                            }
                            if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
                                if (!Array.isArray(message.languageHints))
                                    return "languageHints: array expected";
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    if (!$util.isString(message.languageHints[i]))
                                        return "languageHints: string[] expected";
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams")) {
                                var error = $root.google.cloud.vision.v1p2beta1.CropHintsParams.verify(message.cropHintsParams);
                                if (error)
                                    return "cropHintsParams." + error;
                            }
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p2beta1.WebDetectionParams.verify(message.webDetectionParams);
                                if (error)
                                    return "webDetectionParams." + error;
                            }
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextDetectionParams.verify(message.textDetectionParams);
                                if (error)
                                    return "textDetectionParams." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.ImageContext} ImageContext
                         */
                        ImageContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.ImageContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.ImageContext();
                            if (object.latLongRect != null) {
                                if (typeof object.latLongRect !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageContext.latLongRect: object expected");
                                message.latLongRect = $root.google.cloud.vision.v1p2beta1.LatLongRect.fromObject(object.latLongRect);
                            }
                            if (object.languageHints) {
                                if (!Array.isArray(object.languageHints))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageContext.languageHints: array expected");
                                message.languageHints = [];
                                for (var i = 0; i < object.languageHints.length; ++i)
                                    message.languageHints[i] = String(object.languageHints[i]);
                            }
                            if (object.cropHintsParams != null) {
                                if (typeof object.cropHintsParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageContext.cropHintsParams: object expected");
                                message.cropHintsParams = $root.google.cloud.vision.v1p2beta1.CropHintsParams.fromObject(object.cropHintsParams);
                            }
                            if (object.webDetectionParams != null) {
                                if (typeof object.webDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageContext.webDetectionParams: object expected");
                                message.webDetectionParams = $root.google.cloud.vision.v1p2beta1.WebDetectionParams.fromObject(object.webDetectionParams);
                            }
                            if (object.textDetectionParams != null) {
                                if (typeof object.textDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.ImageContext.textDetectionParams: object expected");
                                message.textDetectionParams = $root.google.cloud.vision.v1p2beta1.TextDetectionParams.fromObject(object.textDetectionParams);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ImageContext} message ImageContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.languageHints = [];
                            if (options.defaults) {
                                object.latLongRect = null;
                                object.cropHintsParams = null;
                                object.webDetectionParams = null;
                                object.textDetectionParams = null;
                            }
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect"))
                                object.latLongRect = $root.google.cloud.vision.v1p2beta1.LatLongRect.toObject(message.latLongRect, options);
                            if (message.languageHints && message.languageHints.length) {
                                object.languageHints = [];
                                for (var j = 0; j < message.languageHints.length; ++j)
                                    object.languageHints[j] = message.languageHints[j];
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams"))
                                object.cropHintsParams = $root.google.cloud.vision.v1p2beta1.CropHintsParams.toObject(message.cropHintsParams, options);
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams"))
                                object.webDetectionParams = $root.google.cloud.vision.v1p2beta1.WebDetectionParams.toObject(message.webDetectionParams, options);
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams"))
                                object.textDetectionParams = $root.google.cloud.vision.v1p2beta1.TextDetectionParams.toObject(message.textDetectionParams, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.ImageContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.ImageContext";
                        };
    
                        return ImageContext;
                    })();
    
                    v1p2beta1.AnnotateImageRequest = (function() {
    
                        /**
                         * Properties of an AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAnnotateImageRequest
                         * @property {google.cloud.vision.v1p2beta1.IImage|null} [image] AnnotateImageRequest image
                         * @property {Array.<google.cloud.vision.v1p2beta1.IFeature>|null} [features] AnnotateImageRequest features
                         * @property {google.cloud.vision.v1p2beta1.IImageContext|null} [imageContext] AnnotateImageRequest imageContext
                         */
    
                        /**
                         * Constructs a new AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AnnotateImageRequest.
                         * @implements IAnnotateImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageRequest=} [properties] Properties to set
                         */
                        function AnnotateImageRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageRequest image.
                         * @member {google.cloud.vision.v1p2beta1.IImage|null|undefined} image
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.image = null;
    
                        /**
                         * AnnotateImageRequest features.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateImageRequest imageContext.
                         * @member {google.cloud.vision.v1p2beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.imageContext = null;
    
                        /**
                         * Creates a new AnnotateImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageRequest} AnnotateImageRequest instance
                         */
                        AnnotateImageRequest.create = function create(properties) {
                            return new AnnotateImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                $root.google.cloud.vision.v1p2beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p2beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.image = $root.google.cloud.vision.v1p2beta1.Image.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p2beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.image != null && message.hasOwnProperty("image")) {
                                var error = $root.google.cloud.vision.v1p2beta1.Image.verify(message.image);
                                if (error)
                                    return "image." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p2beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageRequest} AnnotateImageRequest
                         */
                        AnnotateImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest();
                            if (object.image != null) {
                                if (typeof object.image !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageRequest.image: object expected");
                                message.image = $root.google.cloud.vision.v1p2beta1.Image.fromObject(object.image);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p2beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.fromObject(object.imageContext);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AnnotateImageRequest} message AnnotateImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.image = null;
                                object.imageContext = null;
                            }
                            if (message.image != null && message.hasOwnProperty("image"))
                                object.image = $root.google.cloud.vision.v1p2beta1.Image.toObject(message.image, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p2beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.toObject(message.imageContext, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AnnotateImageRequest";
                        };
    
                        return AnnotateImageRequest;
                    })();
    
                    v1p2beta1.ImageAnnotationContext = (function() {
    
                        /**
                         * Properties of an ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IImageAnnotationContext
                         * @property {string|null} [uri] ImageAnnotationContext uri
                         * @property {number|null} [pageNumber] ImageAnnotationContext pageNumber
                         */
    
                        /**
                         * Constructs a new ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an ImageAnnotationContext.
                         * @implements IImageAnnotationContext
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IImageAnnotationContext=} [properties] Properties to set
                         */
                        function ImageAnnotationContext(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageAnnotationContext uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.uri = "";
    
                        /**
                         * ImageAnnotationContext pageNumber.
                         * @member {number} pageNumber
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.pageNumber = 0;
    
                        /**
                         * Creates a new ImageAnnotationContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageAnnotationContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.ImageAnnotationContext} ImageAnnotationContext instance
                         */
                        ImageAnnotationContext.create = function create(properties) {
                            return new ImageAnnotationContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageNumber = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageAnnotationContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageAnnotationContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                if (!$util.isInteger(message.pageNumber))
                                    return "pageNumber: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageAnnotationContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.ImageAnnotationContext} ImageAnnotationContext
                         */
                        ImageAnnotationContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.pageNumber != null)
                                message.pageNumber = object.pageNumber | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageAnnotationContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ImageAnnotationContext} message ImageAnnotationContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageAnnotationContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.uri = "";
                                object.pageNumber = 0;
                            }
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                object.pageNumber = message.pageNumber;
                            return object;
                        };
    
                        /**
                         * Converts this ImageAnnotationContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageAnnotationContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageAnnotationContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.ImageAnnotationContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageAnnotationContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.ImageAnnotationContext";
                        };
    
                        return ImageAnnotationContext;
                    })();
    
                    v1p2beta1.AnnotateImageResponse = (function() {
    
                        /**
                         * Properties of an AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAnnotateImageResponse
                         * @property {Array.<google.cloud.vision.v1p2beta1.IFaceAnnotation>|null} [faceAnnotations] AnnotateImageResponse faceAnnotations
                         * @property {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>|null} [landmarkAnnotations] AnnotateImageResponse landmarkAnnotations
                         * @property {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>|null} [logoAnnotations] AnnotateImageResponse logoAnnotations
                         * @property {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>|null} [labelAnnotations] AnnotateImageResponse labelAnnotations
                         * @property {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>|null} [textAnnotations] AnnotateImageResponse textAnnotations
                         * @property {google.cloud.vision.v1p2beta1.ITextAnnotation|null} [fullTextAnnotation] AnnotateImageResponse fullTextAnnotation
                         * @property {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation|null} [safeSearchAnnotation] AnnotateImageResponse safeSearchAnnotation
                         * @property {google.cloud.vision.v1p2beta1.IImageProperties|null} [imagePropertiesAnnotation] AnnotateImageResponse imagePropertiesAnnotation
                         * @property {google.cloud.vision.v1p2beta1.ICropHintsAnnotation|null} [cropHintsAnnotation] AnnotateImageResponse cropHintsAnnotation
                         * @property {google.cloud.vision.v1p2beta1.IWebDetection|null} [webDetection] AnnotateImageResponse webDetection
                         * @property {google.rpc.IStatus|null} [error] AnnotateImageResponse error
                         * @property {google.cloud.vision.v1p2beta1.IImageAnnotationContext|null} [context] AnnotateImageResponse context
                         */
    
                        /**
                         * Constructs a new AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AnnotateImageResponse.
                         * @implements IAnnotateImageResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageResponse=} [properties] Properties to set
                         */
                        function AnnotateImageResponse(properties) {
                            this.faceAnnotations = [];
                            this.landmarkAnnotations = [];
                            this.logoAnnotations = [];
                            this.labelAnnotations = [];
                            this.textAnnotations = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageResponse faceAnnotations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IFaceAnnotation>} faceAnnotations
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.faceAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse landmarkAnnotations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>} landmarkAnnotations
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.landmarkAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse logoAnnotations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>} logoAnnotations
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.logoAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse labelAnnotations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>} labelAnnotations
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.labelAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse textAnnotations.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IEntityAnnotation>} textAnnotations
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.textAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse fullTextAnnotation.
                         * @member {google.cloud.vision.v1p2beta1.ITextAnnotation|null|undefined} fullTextAnnotation
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.fullTextAnnotation = null;
    
                        /**
                         * AnnotateImageResponse safeSearchAnnotation.
                         * @member {google.cloud.vision.v1p2beta1.ISafeSearchAnnotation|null|undefined} safeSearchAnnotation
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.safeSearchAnnotation = null;
    
                        /**
                         * AnnotateImageResponse imagePropertiesAnnotation.
                         * @member {google.cloud.vision.v1p2beta1.IImageProperties|null|undefined} imagePropertiesAnnotation
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.imagePropertiesAnnotation = null;
    
                        /**
                         * AnnotateImageResponse cropHintsAnnotation.
                         * @member {google.cloud.vision.v1p2beta1.ICropHintsAnnotation|null|undefined} cropHintsAnnotation
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.cropHintsAnnotation = null;
    
                        /**
                         * AnnotateImageResponse webDetection.
                         * @member {google.cloud.vision.v1p2beta1.IWebDetection|null|undefined} webDetection
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.webDetection = null;
    
                        /**
                         * AnnotateImageResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.error = null;
    
                        /**
                         * AnnotateImageResponse context.
                         * @member {google.cloud.vision.v1p2beta1.IImageAnnotationContext|null|undefined} context
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.context = null;
    
                        /**
                         * Creates a new AnnotateImageResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageResponse} AnnotateImageResponse instance
                         */
                        AnnotateImageResponse.create = function create(properties) {
                            return new AnnotateImageResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.faceAnnotations != null && message.faceAnnotations.length)
                                for (var i = 0; i < message.faceAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.FaceAnnotation.encode(message.faceAnnotations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.landmarkAnnotations != null && message.landmarkAnnotations.length)
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.EntityAnnotation.encode(message.landmarkAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.logoAnnotations != null && message.logoAnnotations.length)
                                for (var i = 0; i < message.logoAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.EntityAnnotation.encode(message.logoAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.labelAnnotations != null && message.labelAnnotations.length)
                                for (var i = 0; i < message.labelAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.EntityAnnotation.encode(message.labelAnnotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.textAnnotations != null && message.textAnnotations.length)
                                for (var i = 0; i < message.textAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.EntityAnnotation.encode(message.textAnnotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.safeSearchAnnotation != null && Object.hasOwnProperty.call(message, "safeSearchAnnotation"))
                                $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.encode(message.safeSearchAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.imagePropertiesAnnotation != null && Object.hasOwnProperty.call(message, "imagePropertiesAnnotation"))
                                $root.google.cloud.vision.v1p2beta1.ImageProperties.encode(message.imagePropertiesAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            if (message.cropHintsAnnotation != null && Object.hasOwnProperty.call(message, "cropHintsAnnotation"))
                                $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation.encode(message.cropHintsAnnotation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                            if (message.fullTextAnnotation != null && Object.hasOwnProperty.call(message, "fullTextAnnotation"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.encode(message.fullTextAnnotation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            if (message.webDetection != null && Object.hasOwnProperty.call(message, "webDetection"))
                                $root.google.cloud.vision.v1p2beta1.WebDetection.encode(message.webDetection, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                            if (message.context != null && Object.hasOwnProperty.call(message, "context"))
                                $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext.encode(message.context, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.faceAnnotations && message.faceAnnotations.length))
                                            message.faceAnnotations = [];
                                        message.faceAnnotations.push($root.google.cloud.vision.v1p2beta1.FaceAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.landmarkAnnotations && message.landmarkAnnotations.length))
                                            message.landmarkAnnotations = [];
                                        message.landmarkAnnotations.push($root.google.cloud.vision.v1p2beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.logoAnnotations && message.logoAnnotations.length))
                                            message.logoAnnotations = [];
                                        message.logoAnnotations.push($root.google.cloud.vision.v1p2beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.labelAnnotations && message.labelAnnotations.length))
                                            message.labelAnnotations = [];
                                        message.labelAnnotations.push($root.google.cloud.vision.v1p2beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        if (!(message.textAnnotations && message.textAnnotations.length))
                                            message.textAnnotations = [];
                                        message.textAnnotations.push($root.google.cloud.vision.v1p2beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 12: {
                                        message.fullTextAnnotation = $root.google.cloud.vision.v1p2beta1.TextAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.safeSearchAnnotation = $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p2beta1.ImageProperties.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 11: {
                                        message.cropHintsAnnotation = $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 13: {
                                        message.webDetection = $root.google.cloud.vision.v1p2beta1.WebDetection.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 9: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 21: {
                                        message.context = $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.faceAnnotations != null && message.hasOwnProperty("faceAnnotations")) {
                                if (!Array.isArray(message.faceAnnotations))
                                    return "faceAnnotations: array expected";
                                for (var i = 0; i < message.faceAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.verify(message.faceAnnotations[i]);
                                    if (error)
                                        return "faceAnnotations." + error;
                                }
                            }
                            if (message.landmarkAnnotations != null && message.hasOwnProperty("landmarkAnnotations")) {
                                if (!Array.isArray(message.landmarkAnnotations))
                                    return "landmarkAnnotations: array expected";
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.verify(message.landmarkAnnotations[i]);
                                    if (error)
                                        return "landmarkAnnotations." + error;
                                }
                            }
                            if (message.logoAnnotations != null && message.hasOwnProperty("logoAnnotations")) {
                                if (!Array.isArray(message.logoAnnotations))
                                    return "logoAnnotations: array expected";
                                for (var i = 0; i < message.logoAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.verify(message.logoAnnotations[i]);
                                    if (error)
                                        return "logoAnnotations." + error;
                                }
                            }
                            if (message.labelAnnotations != null && message.hasOwnProperty("labelAnnotations")) {
                                if (!Array.isArray(message.labelAnnotations))
                                    return "labelAnnotations: array expected";
                                for (var i = 0; i < message.labelAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.verify(message.labelAnnotations[i]);
                                    if (error)
                                        return "labelAnnotations." + error;
                                }
                            }
                            if (message.textAnnotations != null && message.hasOwnProperty("textAnnotations")) {
                                if (!Array.isArray(message.textAnnotations))
                                    return "textAnnotations: array expected";
                                for (var i = 0; i < message.textAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.verify(message.textAnnotations[i]);
                                    if (error)
                                        return "textAnnotations." + error;
                                }
                            }
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.verify(message.fullTextAnnotation);
                                if (error)
                                    return "fullTextAnnotation." + error;
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation")) {
                                var error = $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.verify(message.safeSearchAnnotation);
                                if (error)
                                    return "safeSearchAnnotation." + error;
                            }
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation")) {
                                var error = $root.google.cloud.vision.v1p2beta1.ImageProperties.verify(message.imagePropertiesAnnotation);
                                if (error)
                                    return "imagePropertiesAnnotation." + error;
                            }
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation")) {
                                var error = $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation.verify(message.cropHintsAnnotation);
                                if (error)
                                    return "cropHintsAnnotation." + error;
                            }
                            if (message.webDetection != null && message.hasOwnProperty("webDetection")) {
                                var error = $root.google.cloud.vision.v1p2beta1.WebDetection.verify(message.webDetection);
                                if (error)
                                    return "webDetection." + error;
                            }
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            if (message.context != null && message.hasOwnProperty("context")) {
                                var error = $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext.verify(message.context);
                                if (error)
                                    return "context." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateImageResponse} AnnotateImageResponse
                         */
                        AnnotateImageResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse();
                            if (object.faceAnnotations) {
                                if (!Array.isArray(object.faceAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.faceAnnotations: array expected");
                                message.faceAnnotations = [];
                                for (var i = 0; i < object.faceAnnotations.length; ++i) {
                                    if (typeof object.faceAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.faceAnnotations: object expected");
                                    message.faceAnnotations[i] = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.fromObject(object.faceAnnotations[i]);
                                }
                            }
                            if (object.landmarkAnnotations) {
                                if (!Array.isArray(object.landmarkAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.landmarkAnnotations: array expected");
                                message.landmarkAnnotations = [];
                                for (var i = 0; i < object.landmarkAnnotations.length; ++i) {
                                    if (typeof object.landmarkAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.landmarkAnnotations: object expected");
                                    message.landmarkAnnotations[i] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.fromObject(object.landmarkAnnotations[i]);
                                }
                            }
                            if (object.logoAnnotations) {
                                if (!Array.isArray(object.logoAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.logoAnnotations: array expected");
                                message.logoAnnotations = [];
                                for (var i = 0; i < object.logoAnnotations.length; ++i) {
                                    if (typeof object.logoAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.logoAnnotations: object expected");
                                    message.logoAnnotations[i] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.fromObject(object.logoAnnotations[i]);
                                }
                            }
                            if (object.labelAnnotations) {
                                if (!Array.isArray(object.labelAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.labelAnnotations: array expected");
                                message.labelAnnotations = [];
                                for (var i = 0; i < object.labelAnnotations.length; ++i) {
                                    if (typeof object.labelAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.labelAnnotations: object expected");
                                    message.labelAnnotations[i] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.fromObject(object.labelAnnotations[i]);
                                }
                            }
                            if (object.textAnnotations) {
                                if (!Array.isArray(object.textAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.textAnnotations: array expected");
                                message.textAnnotations = [];
                                for (var i = 0; i < object.textAnnotations.length; ++i) {
                                    if (typeof object.textAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.textAnnotations: object expected");
                                    message.textAnnotations[i] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.fromObject(object.textAnnotations[i]);
                                }
                            }
                            if (object.fullTextAnnotation != null) {
                                if (typeof object.fullTextAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.fullTextAnnotation: object expected");
                                message.fullTextAnnotation = $root.google.cloud.vision.v1p2beta1.TextAnnotation.fromObject(object.fullTextAnnotation);
                            }
                            if (object.safeSearchAnnotation != null) {
                                if (typeof object.safeSearchAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.safeSearchAnnotation: object expected");
                                message.safeSearchAnnotation = $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.fromObject(object.safeSearchAnnotation);
                            }
                            if (object.imagePropertiesAnnotation != null) {
                                if (typeof object.imagePropertiesAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.imagePropertiesAnnotation: object expected");
                                message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p2beta1.ImageProperties.fromObject(object.imagePropertiesAnnotation);
                            }
                            if (object.cropHintsAnnotation != null) {
                                if (typeof object.cropHintsAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.cropHintsAnnotation: object expected");
                                message.cropHintsAnnotation = $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation.fromObject(object.cropHintsAnnotation);
                            }
                            if (object.webDetection != null) {
                                if (typeof object.webDetection !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.webDetection: object expected");
                                message.webDetection = $root.google.cloud.vision.v1p2beta1.WebDetection.fromObject(object.webDetection);
                            }
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            if (object.context != null) {
                                if (typeof object.context !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateImageResponse.context: object expected");
                                message.context = $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext.fromObject(object.context);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AnnotateImageResponse} message AnnotateImageResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.faceAnnotations = [];
                                object.landmarkAnnotations = [];
                                object.logoAnnotations = [];
                                object.labelAnnotations = [];
                                object.textAnnotations = [];
                            }
                            if (options.defaults) {
                                object.safeSearchAnnotation = null;
                                object.imagePropertiesAnnotation = null;
                                object.error = null;
                                object.cropHintsAnnotation = null;
                                object.fullTextAnnotation = null;
                                object.webDetection = null;
                                object.context = null;
                            }
                            if (message.faceAnnotations && message.faceAnnotations.length) {
                                object.faceAnnotations = [];
                                for (var j = 0; j < message.faceAnnotations.length; ++j)
                                    object.faceAnnotations[j] = $root.google.cloud.vision.v1p2beta1.FaceAnnotation.toObject(message.faceAnnotations[j], options);
                            }
                            if (message.landmarkAnnotations && message.landmarkAnnotations.length) {
                                object.landmarkAnnotations = [];
                                for (var j = 0; j < message.landmarkAnnotations.length; ++j)
                                    object.landmarkAnnotations[j] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.toObject(message.landmarkAnnotations[j], options);
                            }
                            if (message.logoAnnotations && message.logoAnnotations.length) {
                                object.logoAnnotations = [];
                                for (var j = 0; j < message.logoAnnotations.length; ++j)
                                    object.logoAnnotations[j] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.toObject(message.logoAnnotations[j], options);
                            }
                            if (message.labelAnnotations && message.labelAnnotations.length) {
                                object.labelAnnotations = [];
                                for (var j = 0; j < message.labelAnnotations.length; ++j)
                                    object.labelAnnotations[j] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.toObject(message.labelAnnotations[j], options);
                            }
                            if (message.textAnnotations && message.textAnnotations.length) {
                                object.textAnnotations = [];
                                for (var j = 0; j < message.textAnnotations.length; ++j)
                                    object.textAnnotations[j] = $root.google.cloud.vision.v1p2beta1.EntityAnnotation.toObject(message.textAnnotations[j], options);
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation"))
                                object.safeSearchAnnotation = $root.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.toObject(message.safeSearchAnnotation, options);
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation"))
                                object.imagePropertiesAnnotation = $root.google.cloud.vision.v1p2beta1.ImageProperties.toObject(message.imagePropertiesAnnotation, options);
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation"))
                                object.cropHintsAnnotation = $root.google.cloud.vision.v1p2beta1.CropHintsAnnotation.toObject(message.cropHintsAnnotation, options);
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation"))
                                object.fullTextAnnotation = $root.google.cloud.vision.v1p2beta1.TextAnnotation.toObject(message.fullTextAnnotation, options);
                            if (message.webDetection != null && message.hasOwnProperty("webDetection"))
                                object.webDetection = $root.google.cloud.vision.v1p2beta1.WebDetection.toObject(message.webDetection, options);
                            if (message.context != null && message.hasOwnProperty("context"))
                                object.context = $root.google.cloud.vision.v1p2beta1.ImageAnnotationContext.toObject(message.context, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateImageResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AnnotateImageResponse";
                        };
    
                        return AnnotateImageResponse;
                    })();
    
                    v1p2beta1.AnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAnnotateFileResponse
                         * @property {google.cloud.vision.v1p2beta1.IInputConfig|null} [inputConfig] AnnotateFileResponse inputConfig
                         * @property {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageResponse>|null} [responses] AnnotateFileResponse responses
                         */
    
                        /**
                         * Constructs a new AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AnnotateFileResponse.
                         * @implements IAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AnnotateFileResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileResponse inputConfig.
                         * @member {google.cloud.vision.v1p2beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileResponse responses.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateFileResponse} AnnotateFileResponse instance
                         */
                        AnnotateFileResponse.create = function create(properties) {
                            return new AnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p2beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p2beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AnnotateFileResponse} AnnotateFileResponse
                         */
                        AnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AnnotateFileResponse();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateFileResponse.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateFileResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AnnotateFileResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AnnotateFileResponse} message AnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (options.defaults)
                                object.inputConfig = null;
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AnnotateFileResponse";
                        };
    
                        return AnnotateFileResponse;
                    })();
    
                    v1p2beta1.BatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageRequest>|null} [requests] BatchAnnotateImagesRequest requests
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a BatchAnnotateImagesRequest.
                         * @implements IBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest instance
                         */
                        BatchAnnotateImagesRequest.create = function create(properties) {
                            return new BatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p2beta1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         */
                        BatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest} message BatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p2beta1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest";
                        };
    
                        return BatchAnnotateImagesRequest;
                    })();
    
                    v1p2beta1.BatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IBatchAnnotateImagesResponse
                         * @property {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageResponse>|null} [responses] BatchAnnotateImagesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a BatchAnnotateImagesResponse.
                         * @implements IBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @instance
                         */
                        BatchAnnotateImagesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse instance
                         */
                        BatchAnnotateImagesResponse.create = function create(properties) {
                            return new BatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         */
                        BatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse} message BatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p2beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse";
                        };
    
                        return BatchAnnotateImagesResponse;
                    })();
    
                    v1p2beta1.AsyncAnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAsyncAnnotateFileRequest
                         * @property {google.cloud.vision.v1p2beta1.IInputConfig|null} [inputConfig] AsyncAnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1p2beta1.IFeature>|null} [features] AsyncAnnotateFileRequest features
                         * @property {google.cloud.vision.v1p2beta1.IImageContext|null} [imageContext] AsyncAnnotateFileRequest imageContext
                         * @property {google.cloud.vision.v1p2beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileRequest outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AsyncAnnotateFileRequest.
                         * @implements IAsyncAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1p2beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AsyncAnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AsyncAnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1p2beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AsyncAnnotateFileRequest outputConfig.
                         * @member {google.cloud.vision.v1p2beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest instance
                         */
                        AsyncAnnotateFileRequest.create = function create(properties) {
                            return new AsyncAnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p2beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p2beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p2beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p2beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p2beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p2beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p2beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         */
                        AsyncAnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p2beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest} message AsyncAnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                                object.outputConfig = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p2beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p2beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p2beta1.ImageContext.toObject(message.imageContext, options);
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest";
                        };
    
                        return AsyncAnnotateFileRequest;
                    })();
    
                    v1p2beta1.AsyncAnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAsyncAnnotateFileResponse
                         * @property {google.cloud.vision.v1p2beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AsyncAnnotateFileResponse.
                         * @implements IAsyncAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileResponse outputConfig.
                         * @member {google.cloud.vision.v1p2beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @instance
                         */
                        AsyncAnnotateFileResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse instance
                         */
                        AsyncAnnotateFileResponse.create = function create(properties) {
                            return new AsyncAnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p2beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p2beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         */
                        AsyncAnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse} message AsyncAnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p2beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse";
                        };
    
                        return AsyncAnnotateFileResponse;
                    })();
    
                    v1p2beta1.AsyncBatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAsyncBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest>|null} [requests] AsyncBatchAnnotateFilesRequest requests
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesRequest.
                         * @implements IAsyncBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IAsyncAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest instance
                         */
                        AsyncBatchAnnotateFilesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         */
                        AsyncBatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest";
                        };
    
                        return AsyncBatchAnnotateFilesRequest;
                    })();
    
                    v1p2beta1.AsyncBatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IAsyncBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse>|null} [responses] AsyncBatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesResponse.
                         * @implements IAsyncBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IAsyncAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse instance
                         */
                        AsyncBatchAnnotateFilesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         */
                        AsyncBatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse";
                        };
    
                        return AsyncBatchAnnotateFilesResponse;
                    })();
    
                    v1p2beta1.InputConfig = (function() {
    
                        /**
                         * Properties of an InputConfig.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IInputConfig
                         * @property {google.cloud.vision.v1p2beta1.IGcsSource|null} [gcsSource] InputConfig gcsSource
                         * @property {string|null} [mimeType] InputConfig mimeType
                         */
    
                        /**
                         * Constructs a new InputConfig.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an InputConfig.
                         * @implements IInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IInputConfig=} [properties] Properties to set
                         */
                        function InputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * InputConfig gcsSource.
                         * @member {google.cloud.vision.v1p2beta1.IGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.gcsSource = null;
    
                        /**
                         * InputConfig mimeType.
                         * @member {string} mimeType
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.mimeType = "";
    
                        /**
                         * Creates a new InputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.InputConfig} InputConfig instance
                         */
                        InputConfig.create = function create(properties) {
                            return new InputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.vision.v1p2beta1.InputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1p2beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.InputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.InputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1p2beta1.GcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.mimeType = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an InputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        InputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                var error = $root.google.cloud.vision.v1p2beta1.GcsSource.verify(message.gcsSource);
                                if (error)
                                    return "gcsSource." + error;
                            }
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                if (!$util.isString(message.mimeType))
                                    return "mimeType: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an InputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.InputConfig} InputConfig
                         */
                        InputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.InputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.InputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.InputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1p2beta1.GcsSource.fromObject(object.gcsSource);
                            }
                            if (object.mimeType != null)
                                message.mimeType = String(object.mimeType);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.InputConfig} message InputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        InputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsSource = null;
                                object.mimeType = "";
                            }
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource"))
                                object.gcsSource = $root.google.cloud.vision.v1p2beta1.GcsSource.toObject(message.gcsSource, options);
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                object.mimeType = message.mimeType;
                            return object;
                        };
    
                        /**
                         * Converts this InputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        InputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for InputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.InputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.InputConfig";
                        };
    
                        return InputConfig;
                    })();
    
                    v1p2beta1.OutputConfig = (function() {
    
                        /**
                         * Properties of an OutputConfig.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IOutputConfig
                         * @property {google.cloud.vision.v1p2beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination
                         * @property {number|null} [batchSize] OutputConfig batchSize
                         */
    
                        /**
                         * Constructs a new OutputConfig.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an OutputConfig.
                         * @implements IOutputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IOutputConfig=} [properties] Properties to set
                         */
                        function OutputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OutputConfig gcsDestination.
                         * @member {google.cloud.vision.v1p2beta1.IGcsDestination|null|undefined} gcsDestination
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.gcsDestination = null;
    
                        /**
                         * OutputConfig batchSize.
                         * @member {number} batchSize
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.batchSize = 0;
    
                        /**
                         * Creates a new OutputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOutputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.OutputConfig} OutputConfig instance
                         */
                        OutputConfig.create = function create(properties) {
                            return new OutputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.vision.v1p2beta1.OutputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination"))
                                $root.google.cloud.vision.v1p2beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.batchSize != null && Object.hasOwnProperty.call(message, "batchSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchSize);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.OutputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.OutputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsDestination = $root.google.cloud.vision.v1p2beta1.GcsDestination.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.batchSize = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OutputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OutputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
                                var error = $root.google.cloud.vision.v1p2beta1.GcsDestination.verify(message.gcsDestination);
                                if (error)
                                    return "gcsDestination." + error;
                            }
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                if (!$util.isInteger(message.batchSize))
                                    return "batchSize: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.OutputConfig} OutputConfig
                         */
                        OutputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.OutputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.OutputConfig();
                            if (object.gcsDestination != null) {
                                if (typeof object.gcsDestination !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.OutputConfig.gcsDestination: object expected");
                                message.gcsDestination = $root.google.cloud.vision.v1p2beta1.GcsDestination.fromObject(object.gcsDestination);
                            }
                            if (object.batchSize != null)
                                message.batchSize = object.batchSize | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.OutputConfig} message OutputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OutputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsDestination = null;
                                object.batchSize = 0;
                            }
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination"))
                                object.gcsDestination = $root.google.cloud.vision.v1p2beta1.GcsDestination.toObject(message.gcsDestination, options);
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                object.batchSize = message.batchSize;
                            return object;
                        };
    
                        /**
                         * Converts this OutputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OutputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OutputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.OutputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.OutputConfig";
                        };
    
                        return OutputConfig;
                    })();
    
                    v1p2beta1.GcsSource = (function() {
    
                        /**
                         * Properties of a GcsSource.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IGcsSource
                         * @property {string|null} [uri] GcsSource uri
                         */
    
                        /**
                         * Constructs a new GcsSource.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a GcsSource.
                         * @implements IGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IGcsSource=} [properties] Properties to set
                         */
                        function GcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsSource uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @instance
                         */
                        GcsSource.prototype.uri = "";
    
                        /**
                         * Creates a new GcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.GcsSource} GcsSource instance
                         */
                        GcsSource.create = function create(properties) {
                            return new GcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.vision.v1p2beta1.GcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.GcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.GcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.GcsSource} GcsSource
                         */
                        GcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.GcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.GcsSource();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.GcsSource} message GcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.GcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.GcsSource";
                        };
    
                        return GcsSource;
                    })();
    
                    v1p2beta1.GcsDestination = (function() {
    
                        /**
                         * Properties of a GcsDestination.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IGcsDestination
                         * @property {string|null} [uri] GcsDestination uri
                         */
    
                        /**
                         * Constructs a new GcsDestination.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a GcsDestination.
                         * @implements IGcsDestination
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IGcsDestination=} [properties] Properties to set
                         */
                        function GcsDestination(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsDestination uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @instance
                         */
                        GcsDestination.prototype.uri = "";
    
                        /**
                         * Creates a new GcsDestination instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsDestination=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.GcsDestination} GcsDestination instance
                         */
                        GcsDestination.create = function create(properties) {
                            return new GcsDestination(properties);
                        };
    
                        /**
                         * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.vision.v1p2beta1.GcsDestination.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.GcsDestination.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.GcsDestination();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsDestination message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsDestination.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.GcsDestination} GcsDestination
                         */
                        GcsDestination.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.GcsDestination)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.GcsDestination();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.GcsDestination} message GcsDestination
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsDestination.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsDestination to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsDestination.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsDestination
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.GcsDestination
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.GcsDestination";
                        };
    
                        return GcsDestination;
                    })();
    
                    v1p2beta1.OperationMetadata = (function() {
    
                        /**
                         * Properties of an OperationMetadata.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IOperationMetadata
                         * @property {google.cloud.vision.v1p2beta1.OperationMetadata.State|null} [state] OperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime
                         * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime
                         */
    
                        /**
                         * Constructs a new OperationMetadata.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents an OperationMetadata.
                         * @implements IOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IOperationMetadata=} [properties] Properties to set
                         */
                        function OperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OperationMetadata state.
                         * @member {google.cloud.vision.v1p2beta1.OperationMetadata.State} state
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.state = 0;
    
                        /**
                         * OperationMetadata createTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} createTime
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.createTime = null;
    
                        /**
                         * OperationMetadata updateTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} updateTime
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.updateTime = null;
    
                        /**
                         * Creates a new OperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.OperationMetadata} OperationMetadata instance
                         */
                        OperationMetadata.create = function create(properties) {
                            return new OperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.vision.v1p2beta1.OperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
                                $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
                                $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.OperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.OperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.createTime != null && message.hasOwnProperty("createTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.createTime);
                                if (error)
                                    return "createTime." + error;
                            }
                            if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
                                if (error)
                                    return "updateTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.OperationMetadata} OperationMetadata
                         */
                        OperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.OperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.OperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "CREATED":
                            case 1:
                                message.state = 1;
                                break;
                            case "RUNNING":
                            case 2:
                                message.state = 2;
                                break;
                            case "DONE":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.createTime != null) {
                                if (typeof object.createTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.OperationMetadata.createTime: object expected");
                                message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
                            }
                            if (object.updateTime != null) {
                                if (typeof object.updateTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.OperationMetadata.updateTime: object expected");
                                message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.OperationMetadata} message OperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.createTime = null;
                                object.updateTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1p2beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p2beta1.OperationMetadata.State[message.state] : message.state;
                            if (message.createTime != null && message.hasOwnProperty("createTime"))
                                object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
                            if (message.updateTime != null && message.hasOwnProperty("updateTime"))
                                object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this OperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.OperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.OperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1p2beta1.OperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} CREATED=1 CREATED value
                         * @property {number} RUNNING=2 RUNNING value
                         * @property {number} DONE=3 DONE value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        OperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "CREATED"] = 1;
                            values[valuesById[2] = "RUNNING"] = 2;
                            values[valuesById[3] = "DONE"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return OperationMetadata;
                    })();
    
                    /**
                     * Likelihood enum.
                     * @name google.cloud.vision.v1p2beta1.Likelihood
                     * @enum {number}
                     * @property {number} UNKNOWN=0 UNKNOWN value
                     * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value
                     * @property {number} UNLIKELY=2 UNLIKELY value
                     * @property {number} POSSIBLE=3 POSSIBLE value
                     * @property {number} LIKELY=4 LIKELY value
                     * @property {number} VERY_LIKELY=5 VERY_LIKELY value
                     */
                    v1p2beta1.Likelihood = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNKNOWN"] = 0;
                        values[valuesById[1] = "VERY_UNLIKELY"] = 1;
                        values[valuesById[2] = "UNLIKELY"] = 2;
                        values[valuesById[3] = "POSSIBLE"] = 3;
                        values[valuesById[4] = "LIKELY"] = 4;
                        values[valuesById[5] = "VERY_LIKELY"] = 5;
                        return values;
                    })();
    
                    v1p2beta1.TextAnnotation = (function() {
    
                        /**
                         * Properties of a TextAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ITextAnnotation
                         * @property {Array.<google.cloud.vision.v1p2beta1.IPage>|null} [pages] TextAnnotation pages
                         * @property {string|null} [text] TextAnnotation text
                         */
    
                        /**
                         * Constructs a new TextAnnotation.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a TextAnnotation.
                         * @implements ITextAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ITextAnnotation=} [properties] Properties to set
                         */
                        function TextAnnotation(properties) {
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextAnnotation pages.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IPage>} pages
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.pages = $util.emptyArray;
    
                        /**
                         * TextAnnotation text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.text = "";
    
                        /**
                         * Creates a new TextAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.TextAnnotation} TextAnnotation instance
                         */
                        TextAnnotation.create = function create(properties) {
                            return new TextAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.pages != null && message.pages.length)
                                for (var i = 0; i < message.pages.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        message.pages.push($root.google.cloud.vision.v1p2beta1.Page.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.text = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Page.verify(message.pages[i]);
                                    if (error)
                                        return "pages." + error;
                                }
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a TextAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.TextAnnotation} TextAnnotation
                         */
                        TextAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.TextAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation();
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.TextAnnotation.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i) {
                                    if (typeof object.pages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.TextAnnotation.pages: object expected");
                                    message.pages[i] = $root.google.cloud.vision.v1p2beta1.Page.fromObject(object.pages[i]);
                                }
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.TextAnnotation} message TextAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.pages = [];
                            if (options.defaults)
                                object.text = "";
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = $root.google.cloud.vision.v1p2beta1.Page.toObject(message.pages[j], options);
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            return object;
                        };
    
                        /**
                         * Converts this TextAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.TextAnnotation";
                        };
    
                        TextAnnotation.DetectedLanguage = (function() {
    
                            /**
                             * Properties of a DetectedLanguage.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @interface IDetectedLanguage
                             * @property {string|null} [languageCode] DetectedLanguage languageCode
                             * @property {number|null} [confidence] DetectedLanguage confidence
                             */
    
                            /**
                             * Constructs a new DetectedLanguage.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @classdesc Represents a DetectedLanguage.
                             * @implements IDetectedLanguage
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             */
                            function DetectedLanguage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedLanguage languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.languageCode = "";
    
                            /**
                             * DetectedLanguage confidence.
                             * @member {number} confidence
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.confidence = 0;
    
                            /**
                             * Creates a new DetectedLanguage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} DetectedLanguage instance
                             */
                            DetectedLanguage.create = function create(properties) {
                                return new DetectedLanguage(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
                                if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.confidence = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedLanguage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedLanguage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    if (typeof message.confidence !== "number")
                                        return "confidence: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             */
                            DetectedLanguage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage();
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.confidence != null)
                                    message.confidence = Number(object.confidence);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage} message DetectedLanguage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedLanguage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.languageCode = "";
                                    object.confidence = 0;
                                }
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedLanguage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedLanguage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedLanguage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage";
                            };
    
                            return DetectedLanguage;
                        })();
    
                        TextAnnotation.DetectedBreak = (function() {
    
                            /**
                             * Properties of a DetectedBreak.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @interface IDetectedBreak
                             * @property {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType|null} [type] DetectedBreak type
                             * @property {boolean|null} [isPrefix] DetectedBreak isPrefix
                             */
    
                            /**
                             * Constructs a new DetectedBreak.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @classdesc Represents a DetectedBreak.
                             * @implements IDetectedBreak
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             */
                            function DetectedBreak(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedBreak type.
                             * @member {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType} type
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.type = 0;
    
                            /**
                             * DetectedBreak isPrefix.
                             * @member {boolean} isPrefix
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.isPrefix = false;
    
                            /**
                             * Creates a new DetectedBreak instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} DetectedBreak instance
                             */
                            DetectedBreak.create = function create(properties) {
                                return new DetectedBreak(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                                if (message.isPrefix != null && Object.hasOwnProperty.call(message, "isPrefix"))
                                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isPrefix);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 2: {
                                            message.isPrefix = reader.bool();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedBreak message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedBreak.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                        break;
                                    }
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    if (typeof message.isPrefix !== "boolean")
                                        return "isPrefix: boolean expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             */
                            DetectedBreak.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "SPACE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "SURE_SPACE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "EOL_SURE_SPACE":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "HYPHEN":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LINE_BREAK":
                                case 5:
                                    message.type = 5;
                                    break;
                                }
                                if (object.isPrefix != null)
                                    message.isPrefix = Boolean(object.isPrefix);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak} message DetectedBreak
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedBreak.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN" : 0;
                                    object.isPrefix = false;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type;
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    object.isPrefix = message.isPrefix;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedBreak to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedBreak.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedBreak
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak";
                            };
    
                            /**
                             * BreakType enum.
                             * @name google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.BreakType
                             * @enum {number}
                             * @property {number} UNKNOWN=0 UNKNOWN value
                             * @property {number} SPACE=1 SPACE value
                             * @property {number} SURE_SPACE=2 SURE_SPACE value
                             * @property {number} EOL_SURE_SPACE=3 EOL_SURE_SPACE value
                             * @property {number} HYPHEN=4 HYPHEN value
                             * @property {number} LINE_BREAK=5 LINE_BREAK value
                             */
                            DetectedBreak.BreakType = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN"] = 0;
                                values[valuesById[1] = "SPACE"] = 1;
                                values[valuesById[2] = "SURE_SPACE"] = 2;
                                values[valuesById[3] = "EOL_SURE_SPACE"] = 3;
                                values[valuesById[4] = "HYPHEN"] = 4;
                                values[valuesById[5] = "LINE_BREAK"] = 5;
                                return values;
                            })();
    
                            return DetectedBreak;
                        })();
    
                        TextAnnotation.TextProperty = (function() {
    
                            /**
                             * Properties of a TextProperty.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @interface ITextProperty
                             * @property {Array.<google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage>|null} [detectedLanguages] TextProperty detectedLanguages
                             * @property {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak|null} [detectedBreak] TextProperty detectedBreak
                             */
    
                            /**
                             * Constructs a new TextProperty.
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation
                             * @classdesc Represents a TextProperty.
                             * @implements ITextProperty
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             */
                            function TextProperty(properties) {
                                this.detectedLanguages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * TextProperty detectedLanguages.
                             * @member {Array.<google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedLanguage>} detectedLanguages
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedLanguages = $util.emptyArray;
    
                            /**
                             * TextProperty detectedBreak.
                             * @member {google.cloud.vision.v1p2beta1.TextAnnotation.IDetectedBreak|null|undefined} detectedBreak
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedBreak = null;
    
                            /**
                             * Creates a new TextProperty instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} TextProperty instance
                             */
                            TextProperty.create = function create(properties) {
                                return new TextProperty(properties);
                            };
    
                            /**
                             * Encodes the specified TextProperty message. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.detectedLanguages != null && message.detectedLanguages.length)
                                    for (var i = 0; i < message.detectedLanguages.length; ++i)
                                        $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
                                    $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified TextProperty message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            if (!(message.detectedLanguages && message.detectedLanguages.length))
                                                message.detectedLanguages = [];
                                            message.detectedLanguages.push($root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 2: {
                                            message.detectedBreak = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a TextProperty message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            TextProperty.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
                                    if (!Array.isArray(message.detectedLanguages))
                                        return "detectedLanguages: array expected";
                                    for (var i = 0; i < message.detectedLanguages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.verify(message.detectedLanguages[i]);
                                        if (error)
                                            return "detectedLanguages." + error;
                                    }
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
                                    var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.verify(message.detectedBreak);
                                    if (error)
                                        return "detectedBreak." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a TextProperty message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} TextProperty
                             */
                            TextProperty.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty();
                                if (object.detectedLanguages) {
                                    if (!Array.isArray(object.detectedLanguages))
                                        throw TypeError(".google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.detectedLanguages: array expected");
                                    message.detectedLanguages = [];
                                    for (var i = 0; i < object.detectedLanguages.length; ++i) {
                                        if (typeof object.detectedLanguages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.detectedLanguages: object expected");
                                        message.detectedLanguages[i] = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.fromObject(object.detectedLanguages[i]);
                                    }
                                }
                                if (object.detectedBreak != null) {
                                    if (typeof object.detectedBreak !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.detectedBreak: object expected");
                                    message.detectedBreak = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.fromObject(object.detectedBreak);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a TextProperty message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty} message TextProperty
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            TextProperty.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults)
                                    object.detectedLanguages = [];
                                if (options.defaults)
                                    object.detectedBreak = null;
                                if (message.detectedLanguages && message.detectedLanguages.length) {
                                    object.detectedLanguages = [];
                                    for (var j = 0; j < message.detectedLanguages.length; ++j)
                                        object.detectedLanguages[j] = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.toObject(message.detectedLanguages[j], options);
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
                                    object.detectedBreak = $root.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.toObject(message.detectedBreak, options);
                                return object;
                            };
    
                            /**
                             * Converts this TextProperty to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            TextProperty.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for TextProperty
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            TextProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty";
                            };
    
                            return TextProperty;
                        })();
    
                        return TextAnnotation;
                    })();
    
                    v1p2beta1.Page = (function() {
    
                        /**
                         * Properties of a Page.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IPage
                         * @property {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null} [property] Page property
                         * @property {number|null} [width] Page width
                         * @property {number|null} [height] Page height
                         * @property {Array.<google.cloud.vision.v1p2beta1.IBlock>|null} [blocks] Page blocks
                         * @property {number|null} [confidence] Page confidence
                         */
    
                        /**
                         * Constructs a new Page.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Page.
                         * @implements IPage
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IPage=} [properties] Properties to set
                         */
                        function Page(properties) {
                            this.blocks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Page property.
                         * @member {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         */
                        Page.prototype.property = null;
    
                        /**
                         * Page width.
                         * @member {number} width
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         */
                        Page.prototype.width = 0;
    
                        /**
                         * Page height.
                         * @member {number} height
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         */
                        Page.prototype.height = 0;
    
                        /**
                         * Page blocks.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IBlock>} blocks
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         */
                        Page.prototype.blocks = $util.emptyArray;
    
                        /**
                         * Page confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         */
                        Page.prototype.confidence = 0;
    
                        /**
                         * Creates a new Page instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Page} Page instance
                         */
                        Page.create = function create(properties) {
                            return new Page(properties);
                        };
    
                        /**
                         * Encodes the specified Page message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Page.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.width);
                            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height);
                            if (message.blocks != null && message.blocks.length)
                                for (var i = 0; i < message.blocks.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Block.encode(message.blocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Page.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Page();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.width = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.height = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        if (!(message.blocks && message.blocks.length))
                                            message.blocks = [];
                                        message.blocks.push($root.google.cloud.vision.v1p2beta1.Block.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Page message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Page.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.width != null && message.hasOwnProperty("width"))
                                if (!$util.isInteger(message.width))
                                    return "width: integer expected";
                            if (message.height != null && message.hasOwnProperty("height"))
                                if (!$util.isInteger(message.height))
                                    return "height: integer expected";
                            if (message.blocks != null && message.hasOwnProperty("blocks")) {
                                if (!Array.isArray(message.blocks))
                                    return "blocks: array expected";
                                for (var i = 0; i < message.blocks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Block.verify(message.blocks[i]);
                                    if (error)
                                        return "blocks." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Page message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Page} Page
                         */
                        Page.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Page)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Page();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Page.property: object expected");
                                message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.width != null)
                                message.width = object.width | 0;
                            if (object.height != null)
                                message.height = object.height | 0;
                            if (object.blocks) {
                                if (!Array.isArray(object.blocks))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Page.blocks: array expected");
                                message.blocks = [];
                                for (var i = 0; i < object.blocks.length; ++i) {
                                    if (typeof object.blocks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.Page.blocks: object expected");
                                    message.blocks[i] = $root.google.cloud.vision.v1p2beta1.Block.fromObject(object.blocks[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Page message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Page} message Page
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Page.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.blocks = [];
                            if (options.defaults) {
                                object.property = null;
                                object.width = 0;
                                object.height = 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.width != null && message.hasOwnProperty("width"))
                                object.width = message.width;
                            if (message.height != null && message.hasOwnProperty("height"))
                                object.height = message.height;
                            if (message.blocks && message.blocks.length) {
                                object.blocks = [];
                                for (var j = 0; j < message.blocks.length; ++j)
                                    object.blocks[j] = $root.google.cloud.vision.v1p2beta1.Block.toObject(message.blocks[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Page to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Page.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Page
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Page
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Page";
                        };
    
                        return Page;
                    })();
    
                    v1p2beta1.Block = (function() {
    
                        /**
                         * Properties of a Block.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IBlock
                         * @property {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null} [property] Block property
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingBox] Block boundingBox
                         * @property {Array.<google.cloud.vision.v1p2beta1.IParagraph>|null} [paragraphs] Block paragraphs
                         * @property {google.cloud.vision.v1p2beta1.Block.BlockType|null} [blockType] Block blockType
                         * @property {number|null} [confidence] Block confidence
                         */
    
                        /**
                         * Constructs a new Block.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Block.
                         * @implements IBlock
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IBlock=} [properties] Properties to set
                         */
                        function Block(properties) {
                            this.paragraphs = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Block property.
                         * @member {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         */
                        Block.prototype.property = null;
    
                        /**
                         * Block boundingBox.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         */
                        Block.prototype.boundingBox = null;
    
                        /**
                         * Block paragraphs.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IParagraph>} paragraphs
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         */
                        Block.prototype.paragraphs = $util.emptyArray;
    
                        /**
                         * Block blockType.
                         * @member {google.cloud.vision.v1p2beta1.Block.BlockType} blockType
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         */
                        Block.prototype.blockType = 0;
    
                        /**
                         * Block confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         */
                        Block.prototype.confidence = 0;
    
                        /**
                         * Creates a new Block instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBlock=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Block} Block instance
                         */
                        Block.create = function create(properties) {
                            return new Block(properties);
                        };
    
                        /**
                         * Encodes the specified Block message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Block.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.paragraphs != null && message.paragraphs.length)
                                for (var i = 0; i < message.paragraphs.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.blockType != null && Object.hasOwnProperty.call(message, "blockType"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.blockType);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Block.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Block();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.paragraphs && message.paragraphs.length))
                                            message.paragraphs = [];
                                        message.paragraphs.push($root.google.cloud.vision.v1p2beta1.Paragraph.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.blockType = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Block message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Block.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
                                if (!Array.isArray(message.paragraphs))
                                    return "paragraphs: array expected";
                                for (var i = 0; i < message.paragraphs.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Paragraph.verify(message.paragraphs[i]);
                                    if (error)
                                        return "paragraphs." + error;
                                }
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                switch (message.blockType) {
                                default:
                                    return "blockType: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Block message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Block} Block
                         */
                        Block.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Block)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Block();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Block.property: object expected");
                                message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Block.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.paragraphs) {
                                if (!Array.isArray(object.paragraphs))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Block.paragraphs: array expected");
                                message.paragraphs = [];
                                for (var i = 0; i < object.paragraphs.length; ++i) {
                                    if (typeof object.paragraphs[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.Block.paragraphs: object expected");
                                    message.paragraphs[i] = $root.google.cloud.vision.v1p2beta1.Paragraph.fromObject(object.paragraphs[i]);
                                }
                            }
                            switch (object.blockType) {
                            default:
                                if (typeof object.blockType === "number") {
                                    message.blockType = object.blockType;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blockType = 0;
                                break;
                            case "TEXT":
                            case 1:
                                message.blockType = 1;
                                break;
                            case "TABLE":
                            case 2:
                                message.blockType = 2;
                                break;
                            case "PICTURE":
                            case 3:
                                message.blockType = 3;
                                break;
                            case "RULER":
                            case 4:
                                message.blockType = 4;
                                break;
                            case "BARCODE":
                            case 5:
                                message.blockType = 5;
                                break;
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Block message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Block} message Block
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Block.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.paragraphs = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.blockType = options.enums === String ? "UNKNOWN" : 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.paragraphs && message.paragraphs.length) {
                                object.paragraphs = [];
                                for (var j = 0; j < message.paragraphs.length; ++j)
                                    object.paragraphs[j] = $root.google.cloud.vision.v1p2beta1.Paragraph.toObject(message.paragraphs[j], options);
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                object.blockType = options.enums === String ? $root.google.cloud.vision.v1p2beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p2beta1.Block.BlockType[message.blockType] : message.blockType;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Block to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Block.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Block
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Block
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Block";
                        };
    
                        /**
                         * BlockType enum.
                         * @name google.cloud.vision.v1p2beta1.Block.BlockType
                         * @enum {number}
                         * @property {number} UNKNOWN=0 UNKNOWN value
                         * @property {number} TEXT=1 TEXT value
                         * @property {number} TABLE=2 TABLE value
                         * @property {number} PICTURE=3 PICTURE value
                         * @property {number} RULER=4 RULER value
                         * @property {number} BARCODE=5 BARCODE value
                         */
                        Block.BlockType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNKNOWN"] = 0;
                            values[valuesById[1] = "TEXT"] = 1;
                            values[valuesById[2] = "TABLE"] = 2;
                            values[valuesById[3] = "PICTURE"] = 3;
                            values[valuesById[4] = "RULER"] = 4;
                            values[valuesById[5] = "BARCODE"] = 5;
                            return values;
                        })();
    
                        return Block;
                    })();
    
                    v1p2beta1.Paragraph = (function() {
    
                        /**
                         * Properties of a Paragraph.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IParagraph
                         * @property {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null} [property] Paragraph property
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingBox] Paragraph boundingBox
                         * @property {Array.<google.cloud.vision.v1p2beta1.IWord>|null} [words] Paragraph words
                         * @property {number|null} [confidence] Paragraph confidence
                         */
    
                        /**
                         * Constructs a new Paragraph.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Paragraph.
                         * @implements IParagraph
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IParagraph=} [properties] Properties to set
                         */
                        function Paragraph(properties) {
                            this.words = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Paragraph property.
                         * @member {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.property = null;
    
                        /**
                         * Paragraph boundingBox.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.boundingBox = null;
    
                        /**
                         * Paragraph words.
                         * @member {Array.<google.cloud.vision.v1p2beta1.IWord>} words
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.words = $util.emptyArray;
    
                        /**
                         * Paragraph confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.confidence = 0;
    
                        /**
                         * Creates a new Paragraph instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IParagraph=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Paragraph} Paragraph instance
                         */
                        Paragraph.create = function create(properties) {
                            return new Paragraph(properties);
                        };
    
                        /**
                         * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Paragraph.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.words != null && message.words.length)
                                for (var i = 0; i < message.words.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Word.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Paragraph.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Paragraph();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.words && message.words.length))
                                            message.words = [];
                                        message.words.push($root.google.cloud.vision.v1p2beta1.Word.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Paragraph message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Paragraph.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.words != null && message.hasOwnProperty("words")) {
                                if (!Array.isArray(message.words))
                                    return "words: array expected";
                                for (var i = 0; i < message.words.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Word.verify(message.words[i]);
                                    if (error)
                                        return "words." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Paragraph} Paragraph
                         */
                        Paragraph.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Paragraph)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Paragraph();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Paragraph.property: object expected");
                                message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Paragraph.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.words) {
                                if (!Array.isArray(object.words))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Paragraph.words: array expected");
                                message.words = [];
                                for (var i = 0; i < object.words.length; ++i) {
                                    if (typeof object.words[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.Paragraph.words: object expected");
                                    message.words[i] = $root.google.cloud.vision.v1p2beta1.Word.fromObject(object.words[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Paragraph} message Paragraph
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Paragraph.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.words = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.words && message.words.length) {
                                object.words = [];
                                for (var j = 0; j < message.words.length; ++j)
                                    object.words[j] = $root.google.cloud.vision.v1p2beta1.Word.toObject(message.words[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Paragraph to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Paragraph.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Paragraph
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Paragraph
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Paragraph";
                        };
    
                        return Paragraph;
                    })();
    
                    v1p2beta1.Word = (function() {
    
                        /**
                         * Properties of a Word.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IWord
                         * @property {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null} [property] Word property
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingBox] Word boundingBox
                         * @property {Array.<google.cloud.vision.v1p2beta1.ISymbol>|null} [symbols] Word symbols
                         * @property {number|null} [confidence] Word confidence
                         */
    
                        /**
                         * Constructs a new Word.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Word.
                         * @implements IWord
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IWord=} [properties] Properties to set
                         */
                        function Word(properties) {
                            this.symbols = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Word property.
                         * @member {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @instance
                         */
                        Word.prototype.property = null;
    
                        /**
                         * Word boundingBox.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @instance
                         */
                        Word.prototype.boundingBox = null;
    
                        /**
                         * Word symbols.
                         * @member {Array.<google.cloud.vision.v1p2beta1.ISymbol>} symbols
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @instance
                         */
                        Word.prototype.symbols = $util.emptyArray;
    
                        /**
                         * Word confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @instance
                         */
                        Word.prototype.confidence = 0;
    
                        /**
                         * Creates a new Word instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWord=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Word} Word instance
                         */
                        Word.create = function create(properties) {
                            return new Word(properties);
                        };
    
                        /**
                         * Encodes the specified Word message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Word.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.symbols != null && message.symbols.length)
                                for (var i = 0; i < message.symbols.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.Symbol.encode(message.symbols[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Word message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Word.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Word();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.symbols && message.symbols.length))
                                            message.symbols = [];
                                        message.symbols.push($root.google.cloud.vision.v1p2beta1.Symbol.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Word message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Word.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.symbols != null && message.hasOwnProperty("symbols")) {
                                if (!Array.isArray(message.symbols))
                                    return "symbols: array expected";
                                for (var i = 0; i < message.symbols.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.Symbol.verify(message.symbols[i]);
                                    if (error)
                                        return "symbols." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Word message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Word} Word
                         */
                        Word.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Word)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Word();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Word.property: object expected");
                                message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Word.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.symbols) {
                                if (!Array.isArray(object.symbols))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Word.symbols: array expected");
                                message.symbols = [];
                                for (var i = 0; i < object.symbols.length; ++i) {
                                    if (typeof object.symbols[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.Word.symbols: object expected");
                                    message.symbols[i] = $root.google.cloud.vision.v1p2beta1.Symbol.fromObject(object.symbols[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Word message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Word} message Word
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Word.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.symbols = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.symbols && message.symbols.length) {
                                object.symbols = [];
                                for (var j = 0; j < message.symbols.length; ++j)
                                    object.symbols[j] = $root.google.cloud.vision.v1p2beta1.Symbol.toObject(message.symbols[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Word to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Word.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Word
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Word
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Word.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Word";
                        };
    
                        return Word;
                    })();
    
                    v1p2beta1.Symbol = (function() {
    
                        /**
                         * Properties of a Symbol.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface ISymbol
                         * @property {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null} [property] Symbol property
                         * @property {google.cloud.vision.v1p2beta1.IBoundingPoly|null} [boundingBox] Symbol boundingBox
                         * @property {string|null} [text] Symbol text
                         * @property {number|null} [confidence] Symbol confidence
                         */
    
                        /**
                         * Constructs a new Symbol.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a Symbol.
                         * @implements ISymbol
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.ISymbol=} [properties] Properties to set
                         */
                        function Symbol(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Symbol property.
                         * @member {google.cloud.vision.v1p2beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.property = null;
    
                        /**
                         * Symbol boundingBox.
                         * @member {google.cloud.vision.v1p2beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.boundingBox = null;
    
                        /**
                         * Symbol text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.text = "";
    
                        /**
                         * Symbol confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.confidence = 0;
    
                        /**
                         * Creates a new Symbol instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISymbol=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.Symbol} Symbol instance
                         */
                        Symbol.create = function create(properties) {
                            return new Symbol(properties);
                        };
    
                        /**
                         * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.vision.v1p2beta1.Symbol.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p2beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.Symbol.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.Symbol();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.text = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Symbol message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Symbol.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p2beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.Symbol} Symbol
                         */
                        Symbol.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.Symbol)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.Symbol();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Symbol.property: object expected");
                                message.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p2beta1.Symbol.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Symbol message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.Symbol} message Symbol
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Symbol.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.text = "";
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p2beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Symbol to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Symbol.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Symbol
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.Symbol
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.Symbol";
                        };
    
                        return Symbol;
                    })();
    
                    v1p2beta1.WebDetection = (function() {
    
                        /**
                         * Properties of a WebDetection.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @interface IWebDetection
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebEntity>|null} [webEntities] WebDetection webEntities
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebDetection fullMatchingImages
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebDetection partialMatchingImages
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebPage>|null} [pagesWithMatchingImages] WebDetection pagesWithMatchingImages
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>|null} [visuallySimilarImages] WebDetection visuallySimilarImages
                         * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebLabel>|null} [bestGuessLabels] WebDetection bestGuessLabels
                         */
    
                        /**
                         * Constructs a new WebDetection.
                         * @memberof google.cloud.vision.v1p2beta1
                         * @classdesc Represents a WebDetection.
                         * @implements IWebDetection
                         * @constructor
                         * @param {google.cloud.vision.v1p2beta1.IWebDetection=} [properties] Properties to set
                         */
                        function WebDetection(properties) {
                            this.webEntities = [];
                            this.fullMatchingImages = [];
                            this.partialMatchingImages = [];
                            this.pagesWithMatchingImages = [];
                            this.visuallySimilarImages = [];
                            this.bestGuessLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetection webEntities.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebEntity>} webEntities
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.webEntities = $util.emptyArray;
    
                        /**
                         * WebDetection fullMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>} fullMatchingImages
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.fullMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection partialMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>} partialMatchingImages
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.partialMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection pagesWithMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebPage>} pagesWithMatchingImages
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.pagesWithMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection visuallySimilarImages.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>} visuallySimilarImages
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.visuallySimilarImages = $util.emptyArray;
    
                        /**
                         * WebDetection bestGuessLabels.
                         * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebLabel>} bestGuessLabels
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.bestGuessLabels = $util.emptyArray;
    
                        /**
                         * Creates a new WebDetection instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetection=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p2beta1.WebDetection} WebDetection instance
                         */
                        WebDetection.create = function create(properties) {
                            return new WebDetection(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetection message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.webEntities != null && message.webEntities.length)
                                for (var i = 0; i < message.webEntities.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.encode(message.webEntities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pagesWithMatchingImages != null && message.pagesWithMatchingImages.length)
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage.encode(message.pagesWithMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.visuallySimilarImages != null && message.visuallySimilarImages.length)
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.encode(message.visuallySimilarImages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.bestGuessLabels != null && message.bestGuessLabels.length)
                                for (var i = 0; i < message.bestGuessLabels.length; ++i)
                                    $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.encode(message.bestGuessLabels[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetection message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p2beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetection();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.webEntities && message.webEntities.length))
                                            message.webEntities = [];
                                        message.webEntities.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                            message.fullMatchingImages = [];
                                        message.fullMatchingImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                            message.partialMatchingImages = [];
                                        message.partialMatchingImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pagesWithMatchingImages && message.pagesWithMatchingImages.length))
                                            message.pagesWithMatchingImages = [];
                                        message.pagesWithMatchingImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebPage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.visuallySimilarImages && message.visuallySimilarImages.length))
                                            message.visuallySimilarImages = [];
                                        message.visuallySimilarImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 8: {
                                        if (!(message.bestGuessLabels && message.bestGuessLabels.length))
                                            message.bestGuessLabels = [];
                                        message.bestGuessLabels.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p2beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetection message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetection.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.webEntities != null && message.hasOwnProperty("webEntities")) {
                                if (!Array.isArray(message.webEntities))
                                    return "webEntities: array expected";
                                for (var i = 0; i < message.webEntities.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.verify(message.webEntities[i]);
                                    if (error)
                                        return "webEntities." + error;
                                }
                            }
                            if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                if (!Array.isArray(message.fullMatchingImages))
                                    return "fullMatchingImages: array expected";
                                for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                    if (error)
                                        return "fullMatchingImages." + error;
                                }
                            }
                            if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                if (!Array.isArray(message.partialMatchingImages))
                                    return "partialMatchingImages: array expected";
                                for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                    if (error)
                                        return "partialMatchingImages." + error;
                                }
                            }
                            if (message.pagesWithMatchingImages != null && message.hasOwnProperty("pagesWithMatchingImages")) {
                                if (!Array.isArray(message.pagesWithMatchingImages))
                                    return "pagesWithMatchingImages: array expected";
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage.verify(message.pagesWithMatchingImages[i]);
                                    if (error)
                                        return "pagesWithMatchingImages." + error;
                                }
                            }
                            if (message.visuallySimilarImages != null && message.hasOwnProperty("visuallySimilarImages")) {
                                if (!Array.isArray(message.visuallySimilarImages))
                                    return "visuallySimilarImages: array expected";
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify(message.visuallySimilarImages[i]);
                                    if (error)
                                        return "visuallySimilarImages." + error;
                                }
                            }
                            if (message.bestGuessLabels != null && message.hasOwnProperty("bestGuessLabels")) {
                                if (!Array.isArray(message.bestGuessLabels))
                                    return "bestGuessLabels: array expected";
                                for (var i = 0; i < message.bestGuessLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.verify(message.bestGuessLabels[i]);
                                    if (error)
                                        return "bestGuessLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a WebDetection message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p2beta1.WebDetection} WebDetection
                         */
                        WebDetection.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetection)
                                return object;
                            var message = new $root.google.cloud.vision.v1p2beta1.WebDetection();
                            if (object.webEntities) {
                                if (!Array.isArray(object.webEntities))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.webEntities: array expected");
                                message.webEntities = [];
                                for (var i = 0; i < object.webEntities.length; ++i) {
                                    if (typeof object.webEntities[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.webEntities: object expected");
                                    message.webEntities[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.fromObject(object.webEntities[i]);
                                }
                            }
                            if (object.fullMatchingImages) {
                                if (!Array.isArray(object.fullMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.fullMatchingImages: array expected");
                                message.fullMatchingImages = [];
                                for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                    if (typeof object.fullMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.fullMatchingImages: object expected");
                                    message.fullMatchingImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                }
                            }
                            if (object.partialMatchingImages) {
                                if (!Array.isArray(object.partialMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.partialMatchingImages: array expected");
                                message.partialMatchingImages = [];
                                for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                    if (typeof object.partialMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.partialMatchingImages: object expected");
                                    message.partialMatchingImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                }
                            }
                            if (object.pagesWithMatchingImages) {
                                if (!Array.isArray(object.pagesWithMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.pagesWithMatchingImages: array expected");
                                message.pagesWithMatchingImages = [];
                                for (var i = 0; i < object.pagesWithMatchingImages.length; ++i) {
                                    if (typeof object.pagesWithMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.pagesWithMatchingImages: object expected");
                                    message.pagesWithMatchingImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage.fromObject(object.pagesWithMatchingImages[i]);
                                }
                            }
                            if (object.visuallySimilarImages) {
                                if (!Array.isArray(object.visuallySimilarImages))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.visuallySimilarImages: array expected");
                                message.visuallySimilarImages = [];
                                for (var i = 0; i < object.visuallySimilarImages.length; ++i) {
                                    if (typeof object.visuallySimilarImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.visuallySimilarImages: object expected");
                                    message.visuallySimilarImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.fromObject(object.visuallySimilarImages[i]);
                                }
                            }
                            if (object.bestGuessLabels) {
                                if (!Array.isArray(object.bestGuessLabels))
                                    throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.bestGuessLabels: array expected");
                                message.bestGuessLabels = [];
                                for (var i = 0; i < object.bestGuessLabels.length; ++i) {
                                    if (typeof object.bestGuessLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.bestGuessLabels: object expected");
                                    message.bestGuessLabels[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.fromObject(object.bestGuessLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetection message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p2beta1.WebDetection} message WebDetection
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetection.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.webEntities = [];
                                object.fullMatchingImages = [];
                                object.partialMatchingImages = [];
                                object.pagesWithMatchingImages = [];
                                object.visuallySimilarImages = [];
                                object.bestGuessLabels = [];
                            }
                            if (message.webEntities && message.webEntities.length) {
                                object.webEntities = [];
                                for (var j = 0; j < message.webEntities.length; ++j)
                                    object.webEntities[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.toObject(message.webEntities[j], options);
                            }
                            if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                object.fullMatchingImages = [];
                                for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                    object.fullMatchingImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                            }
                            if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                object.partialMatchingImages = [];
                                for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                    object.partialMatchingImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                            }
                            if (message.pagesWithMatchingImages && message.pagesWithMatchingImages.length) {
                                object.pagesWithMatchingImages = [];
                                for (var j = 0; j < message.pagesWithMatchingImages.length; ++j)
                                    object.pagesWithMatchingImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage.toObject(message.pagesWithMatchingImages[j], options);
                            }
                            if (message.visuallySimilarImages && message.visuallySimilarImages.length) {
                                object.visuallySimilarImages = [];
                                for (var j = 0; j < message.visuallySimilarImages.length; ++j)
                                    object.visuallySimilarImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.toObject(message.visuallySimilarImages[j], options);
                            }
                            if (message.bestGuessLabels && message.bestGuessLabels.length) {
                                object.bestGuessLabels = [];
                                for (var j = 0; j < message.bestGuessLabels.length; ++j)
                                    object.bestGuessLabels[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.toObject(message.bestGuessLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this WebDetection to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetection.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetection
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p2beta1.WebDetection
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetection";
                        };
    
                        WebDetection.WebEntity = (function() {
    
                            /**
                             * Properties of a WebEntity.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @interface IWebEntity
                             * @property {string|null} [entityId] WebEntity entityId
                             * @property {number|null} [score] WebEntity score
                             * @property {string|null} [description] WebEntity description
                             */
    
                            /**
                             * Constructs a new WebEntity.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @classdesc Represents a WebEntity.
                             * @implements IWebEntity
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             */
                            function WebEntity(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebEntity entityId.
                             * @member {string} entityId
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.entityId = "";
    
                            /**
                             * WebEntity score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.score = 0;
    
                            /**
                             * WebEntity description.
                             * @member {string} description
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.description = "";
    
                            /**
                             * Creates a new WebEntity instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebEntity} WebEntity instance
                             */
                            WebEntity.create = function create(properties) {
                                return new WebEntity(properties);
                            };
    
                            /**
                             * Encodes the specified WebEntity message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityId);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebEntity message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.entityId = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.description = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebEntity message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebEntity.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    if (!$util.isString(message.entityId))
                                        return "entityId: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.description != null && message.hasOwnProperty("description"))
                                    if (!$util.isString(message.description))
                                        return "description: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebEntity message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebEntity} WebEntity
                             */
                            WebEntity.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebEntity();
                                if (object.entityId != null)
                                    message.entityId = String(object.entityId);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.description != null)
                                    message.description = String(object.description);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebEntity message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.WebEntity} message WebEntity
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebEntity.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.entityId = "";
                                    object.score = 0;
                                    object.description = "";
                                }
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    object.entityId = message.entityId;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.description != null && message.hasOwnProperty("description"))
                                    object.description = message.description;
                                return object;
                            };
    
                            /**
                             * Converts this WebEntity to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebEntity.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebEntity
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebEntity
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetection.WebEntity";
                            };
    
                            return WebEntity;
                        })();
    
                        WebDetection.WebImage = (function() {
    
                            /**
                             * Properties of a WebImage.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @interface IWebImage
                             * @property {string|null} [url] WebImage url
                             * @property {number|null} [score] WebImage score
                             */
    
                            /**
                             * Constructs a new WebImage.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @classdesc Represents a WebImage.
                             * @implements IWebImage
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebImage=} [properties] Properties to set
                             */
                            function WebImage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebImage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.url = "";
    
                            /**
                             * WebImage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.score = 0;
    
                            /**
                             * Creates a new WebImage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebImage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebImage} WebImage instance
                             */
                            WebImage.create = function create(properties) {
                                return new WebImage(properties);
                            };
    
                            /**
                             * Encodes the specified WebImage message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebImage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebImage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebImage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebImage} WebImage
                             */
                            WebImage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebImage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.WebImage} message WebImage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebImage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this WebImage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebImage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebImage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebImage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetection.WebImage";
                            };
    
                            return WebImage;
                        })();
    
                        WebDetection.WebPage = (function() {
    
                            /**
                             * Properties of a WebPage.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @interface IWebPage
                             * @property {string|null} [url] WebPage url
                             * @property {number|null} [score] WebPage score
                             * @property {string|null} [pageTitle] WebPage pageTitle
                             * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebPage fullMatchingImages
                             * @property {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebPage partialMatchingImages
                             */
    
                            /**
                             * Constructs a new WebPage.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @classdesc Represents a WebPage.
                             * @implements IWebPage
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebPage=} [properties] Properties to set
                             */
                            function WebPage(properties) {
                                this.fullMatchingImages = [];
                                this.partialMatchingImages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebPage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.url = "";
    
                            /**
                             * WebPage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.score = 0;
    
                            /**
                             * WebPage pageTitle.
                             * @member {string} pageTitle
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.pageTitle = "";
    
                            /**
                             * WebPage fullMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>} fullMatchingImages
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.fullMatchingImages = $util.emptyArray;
    
                            /**
                             * WebPage partialMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p2beta1.WebDetection.IWebImage>} partialMatchingImages
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.partialMatchingImages = $util.emptyArray;
    
                            /**
                             * Creates a new WebPage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebPage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebPage} WebPage instance
                             */
                            WebPage.create = function create(properties) {
                                return new WebPage(properties);
                            };
    
                            /**
                             * Encodes the specified WebPage message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.pageTitle != null && Object.hasOwnProperty.call(message, "pageTitle"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageTitle);
                                if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebPage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.pageTitle = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                                message.fullMatchingImages = [];
                                            message.fullMatchingImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 5: {
                                            if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                                message.partialMatchingImages = [];
                                            message.partialMatchingImages.push($root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebPage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebPage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    if (!$util.isString(message.pageTitle))
                                        return "pageTitle: string expected";
                                if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                    if (!Array.isArray(message.fullMatchingImages))
                                        return "fullMatchingImages: array expected";
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                        if (error)
                                            return "fullMatchingImages." + error;
                                    }
                                }
                                if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                    if (!Array.isArray(message.partialMatchingImages))
                                        return "partialMatchingImages: array expected";
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                        if (error)
                                            return "partialMatchingImages." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a WebPage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebPage} WebPage
                             */
                            WebPage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebPage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.pageTitle != null)
                                    message.pageTitle = String(object.pageTitle);
                                if (object.fullMatchingImages) {
                                    if (!Array.isArray(object.fullMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.WebPage.fullMatchingImages: array expected");
                                    message.fullMatchingImages = [];
                                    for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                        if (typeof object.fullMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.WebPage.fullMatchingImages: object expected");
                                        message.fullMatchingImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                    }
                                }
                                if (object.partialMatchingImages) {
                                    if (!Array.isArray(object.partialMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.WebPage.partialMatchingImages: array expected");
                                    message.partialMatchingImages = [];
                                    for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                        if (typeof object.partialMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p2beta1.WebDetection.WebPage.partialMatchingImages: object expected");
                                        message.partialMatchingImages[i] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebPage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.WebPage} message WebPage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebPage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.fullMatchingImages = [];
                                    object.partialMatchingImages = [];
                                }
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                    object.pageTitle = "";
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    object.pageTitle = message.pageTitle;
                                if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                    object.fullMatchingImages = [];
                                    for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                        object.fullMatchingImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                                }
                                if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                    object.partialMatchingImages = [];
                                    for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                        object.partialMatchingImages[j] = $root.google.cloud.vision.v1p2beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this WebPage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebPage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebPage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebPage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebPage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetection.WebPage";
                            };
    
                            return WebPage;
                        })();
    
                        WebDetection.WebLabel = (function() {
    
                            /**
                             * Properties of a WebLabel.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @interface IWebLabel
                             * @property {string|null} [label] WebLabel label
                             * @property {string|null} [languageCode] WebLabel languageCode
                             */
    
                            /**
                             * Constructs a new WebLabel.
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection
                             * @classdesc Represents a WebLabel.
                             * @implements IWebLabel
                             * @constructor
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             */
                            function WebLabel(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebLabel label.
                             * @member {string} label
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.label = "";
    
                            /**
                             * WebLabel languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.languageCode = "";
    
                            /**
                             * Creates a new WebLabel instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebLabel} WebLabel instance
                             */
                            WebLabel.create = function create(properties) {
                                return new WebLabel(properties);
                            };
    
                            /**
                             * Encodes the specified WebLabel message. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebLabel message, length delimited. Does not implicitly {@link google.cloud.vision.v1p2beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.label = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebLabel message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebLabel.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.label != null && message.hasOwnProperty("label"))
                                    if (!$util.isString(message.label))
                                        return "label: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebLabel message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p2beta1.WebDetection.WebLabel} WebLabel
                             */
                            WebLabel.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p2beta1.WebDetection.WebLabel();
                                if (object.label != null)
                                    message.label = String(object.label);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebLabel message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p2beta1.WebDetection.WebLabel} message WebLabel
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebLabel.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.label = "";
                                    object.languageCode = "";
                                }
                                if (message.label != null && message.hasOwnProperty("label"))
                                    object.label = message.label;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                return object;
                            };
    
                            /**
                             * Converts this WebLabel to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebLabel.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebLabel
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p2beta1.WebDetection.WebLabel
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p2beta1.WebDetection.WebLabel";
                            };
    
                            return WebLabel;
                        })();
    
                        return WebDetection;
                    })();
    
                    return v1p2beta1;
                })();
    
                vision.v1p3beta1 = (function() {
    
                    /**
                     * Namespace v1p3beta1.
                     * @memberof google.cloud.vision
                     * @namespace
                     */
                    var v1p3beta1 = {};
    
                    v1p3beta1.Vertex = (function() {
    
                        /**
                         * Properties of a Vertex.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IVertex
                         * @property {number|null} [x] Vertex x
                         * @property {number|null} [y] Vertex y
                         */
    
                        /**
                         * Constructs a new Vertex.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Vertex.
                         * @implements IVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IVertex=} [properties] Properties to set
                         */
                        function Vertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Vertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.x = 0;
    
                        /**
                         * Vertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.y = 0;
    
                        /**
                         * Creates a new Vertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Vertex} Vertex instance
                         */
                        Vertex.create = function create(properties) {
                            return new Vertex(properties);
                        };
    
                        /**
                         * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Vertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Vertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Vertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Vertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Vertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (!$util.isInteger(message.x))
                                    return "x: integer expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (!$util.isInteger(message.y))
                                    return "y: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Vertex} Vertex
                         */
                        Vertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Vertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Vertex();
                            if (object.x != null)
                                message.x = object.x | 0;
                            if (object.y != null)
                                message.y = object.y | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Vertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Vertex} message Vertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Vertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = message.y;
                            return object;
                        };
    
                        /**
                         * Converts this Vertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Vertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Vertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Vertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Vertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Vertex";
                        };
    
                        return Vertex;
                    })();
    
                    v1p3beta1.NormalizedVertex = (function() {
    
                        /**
                         * Properties of a NormalizedVertex.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface INormalizedVertex
                         * @property {number|null} [x] NormalizedVertex x
                         * @property {number|null} [y] NormalizedVertex y
                         */
    
                        /**
                         * Constructs a new NormalizedVertex.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a NormalizedVertex.
                         * @implements INormalizedVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.INormalizedVertex=} [properties] Properties to set
                         */
                        function NormalizedVertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * NormalizedVertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.x = 0;
    
                        /**
                         * NormalizedVertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.y = 0;
    
                        /**
                         * Creates a new NormalizedVertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.INormalizedVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.NormalizedVertex} NormalizedVertex instance
                         */
                        NormalizedVertex.create = function create(properties) {
                            return new NormalizedVertex(properties);
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.vision.v1p3beta1.NormalizedVertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.NormalizedVertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.NormalizedVertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a NormalizedVertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        NormalizedVertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.NormalizedVertex} NormalizedVertex
                         */
                        NormalizedVertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.NormalizedVertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.NormalizedVertex();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.NormalizedVertex} message NormalizedVertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        NormalizedVertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            return object;
                        };
    
                        /**
                         * Converts this NormalizedVertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        NormalizedVertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for NormalizedVertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.NormalizedVertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        NormalizedVertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.NormalizedVertex";
                        };
    
                        return NormalizedVertex;
                    })();
    
                    v1p3beta1.BoundingPoly = (function() {
    
                        /**
                         * Properties of a BoundingPoly.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p3beta1.IVertex>|null} [vertices] BoundingPoly vertices
                         * @property {Array.<google.cloud.vision.v1p3beta1.INormalizedVertex>|null} [normalizedVertices] BoundingPoly normalizedVertices
                         */
    
                        /**
                         * Constructs a new BoundingPoly.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a BoundingPoly.
                         * @implements IBoundingPoly
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IBoundingPoly=} [properties] Properties to set
                         */
                        function BoundingPoly(properties) {
                            this.vertices = [];
                            this.normalizedVertices = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BoundingPoly vertices.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IVertex>} vertices
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.vertices = $util.emptyArray;
    
                        /**
                         * BoundingPoly normalizedVertices.
                         * @member {Array.<google.cloud.vision.v1p3beta1.INormalizedVertex>} normalizedVertices
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.normalizedVertices = $util.emptyArray;
    
                        /**
                         * Creates a new BoundingPoly instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBoundingPoly=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.BoundingPoly} BoundingPoly instance
                         */
                        BoundingPoly.create = function create(properties) {
                            return new BoundingPoly(properties);
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1p3beta1.BoundingPoly.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.vertices != null && message.vertices.length)
                                for (var i = 0; i < message.vertices.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.normalizedVertices != null && message.normalizedVertices.length)
                                for (var i = 0; i < message.normalizedVertices.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.BoundingPoly.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.BoundingPoly();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.vertices && message.vertices.length))
                                            message.vertices = [];
                                        message.vertices.push($root.google.cloud.vision.v1p3beta1.Vertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.normalizedVertices && message.normalizedVertices.length))
                                            message.normalizedVertices = [];
                                        message.normalizedVertices.push($root.google.cloud.vision.v1p3beta1.NormalizedVertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BoundingPoly message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BoundingPoly.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.vertices != null && message.hasOwnProperty("vertices")) {
                                if (!Array.isArray(message.vertices))
                                    return "vertices: array expected";
                                for (var i = 0; i < message.vertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Vertex.verify(message.vertices[i]);
                                    if (error)
                                        return "vertices." + error;
                                }
                            }
                            if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) {
                                if (!Array.isArray(message.normalizedVertices))
                                    return "normalizedVertices: array expected";
                                for (var i = 0; i < message.normalizedVertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.NormalizedVertex.verify(message.normalizedVertices[i]);
                                    if (error)
                                        return "normalizedVertices." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.BoundingPoly} BoundingPoly
                         */
                        BoundingPoly.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.BoundingPoly)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.BoundingPoly();
                            if (object.vertices) {
                                if (!Array.isArray(object.vertices))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BoundingPoly.vertices: array expected");
                                message.vertices = [];
                                for (var i = 0; i < object.vertices.length; ++i) {
                                    if (typeof object.vertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.BoundingPoly.vertices: object expected");
                                    message.vertices[i] = $root.google.cloud.vision.v1p3beta1.Vertex.fromObject(object.vertices[i]);
                                }
                            }
                            if (object.normalizedVertices) {
                                if (!Array.isArray(object.normalizedVertices))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BoundingPoly.normalizedVertices: array expected");
                                message.normalizedVertices = [];
                                for (var i = 0; i < object.normalizedVertices.length; ++i) {
                                    if (typeof object.normalizedVertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.BoundingPoly.normalizedVertices: object expected");
                                    message.normalizedVertices[i] = $root.google.cloud.vision.v1p3beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.BoundingPoly} message BoundingPoly
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BoundingPoly.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.vertices = [];
                                object.normalizedVertices = [];
                            }
                            if (message.vertices && message.vertices.length) {
                                object.vertices = [];
                                for (var j = 0; j < message.vertices.length; ++j)
                                    object.vertices[j] = $root.google.cloud.vision.v1p3beta1.Vertex.toObject(message.vertices[j], options);
                            }
                            if (message.normalizedVertices && message.normalizedVertices.length) {
                                object.normalizedVertices = [];
                                for (var j = 0; j < message.normalizedVertices.length; ++j)
                                    object.normalizedVertices[j] = $root.google.cloud.vision.v1p3beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BoundingPoly to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BoundingPoly.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BoundingPoly
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.BoundingPoly
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BoundingPoly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.BoundingPoly";
                        };
    
                        return BoundingPoly;
                    })();
    
                    v1p3beta1.Position = (function() {
    
                        /**
                         * Properties of a Position.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IPosition
                         * @property {number|null} [x] Position x
                         * @property {number|null} [y] Position y
                         * @property {number|null} [z] Position z
                         */
    
                        /**
                         * Constructs a new Position.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Position.
                         * @implements IPosition
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IPosition=} [properties] Properties to set
                         */
                        function Position(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Position x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @instance
                         */
                        Position.prototype.x = 0;
    
                        /**
                         * Position y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @instance
                         */
                        Position.prototype.y = 0;
    
                        /**
                         * Position z.
                         * @member {number} z
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @instance
                         */
                        Position.prototype.z = 0;
    
                        /**
                         * Creates a new Position instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPosition=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Position} Position instance
                         */
                        Position.create = function create(properties) {
                            return new Position(properties);
                        };
    
                        /**
                         * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Position.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            if (message.z != null && Object.hasOwnProperty.call(message, "z"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.z);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Position.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Position();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.z = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Position message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Position.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            if (message.z != null && message.hasOwnProperty("z"))
                                if (typeof message.z !== "number")
                                    return "z: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Position message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Position} Position
                         */
                        Position.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Position)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Position();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            if (object.z != null)
                                message.z = Number(object.z);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Position message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Position} message Position
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Position.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                                object.z = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            if (message.z != null && message.hasOwnProperty("z"))
                                object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z;
                            return object;
                        };
    
                        /**
                         * Converts this Position to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Position.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Position
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Position
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Position";
                        };
    
                        return Position;
                    })();
    
                    v1p3beta1.ImageAnnotator = (function() {
    
                        /**
                         * Constructs a new ImageAnnotator service.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImageAnnotator
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ImageAnnotator(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ImageAnnotator.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageAnnotator;
    
                        /**
                         * Creates new ImageAnnotator service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ImageAnnotator} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ImageAnnotator.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ImageAnnotator|batchAnnotateImages}.
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @typedef BatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} [response] BatchAnnotateImagesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ImageAnnotator.BatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateImages = function batchAnnotateImages(request, callback) {
                            return this.rpcCall(batchAnnotateImages, $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest, $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateImages" });
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ImageAnnotator|asyncBatchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ImageAnnotator.AsyncBatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateFiles = function asyncBatchAnnotateFiles(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateFiles, $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateFiles" });
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ImageAnnotator;
                    })();
    
                    v1p3beta1.Feature = (function() {
    
                        /**
                         * Properties of a Feature.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IFeature
                         * @property {google.cloud.vision.v1p3beta1.Feature.Type|null} [type] Feature type
                         * @property {number|null} [maxResults] Feature maxResults
                         * @property {string|null} [model] Feature model
                         */
    
                        /**
                         * Constructs a new Feature.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Feature.
                         * @implements IFeature
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IFeature=} [properties] Properties to set
                         */
                        function Feature(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Feature type.
                         * @member {google.cloud.vision.v1p3beta1.Feature.Type} type
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @instance
                         */
                        Feature.prototype.type = 0;
    
                        /**
                         * Feature maxResults.
                         * @member {number} maxResults
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @instance
                         */
                        Feature.prototype.maxResults = 0;
    
                        /**
                         * Feature model.
                         * @member {string} model
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @instance
                         */
                        Feature.prototype.model = "";
    
                        /**
                         * Creates a new Feature instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFeature=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Feature} Feature instance
                         */
                        Feature.create = function create(properties) {
                            return new Feature(properties);
                        };
    
                        /**
                         * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Feature.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                            if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults);
                            if (message.model != null && Object.hasOwnProperty.call(message, "model"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.model);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Feature.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Feature();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.type = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.maxResults = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.model = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Feature message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Feature.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.type != null && message.hasOwnProperty("type"))
                                switch (message.type) {
                                default:
                                    return "type: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 11:
                                case 6:
                                case 7:
                                case 9:
                                case 10:
                                case 12:
                                case 19:
                                    break;
                                }
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                if (!$util.isInteger(message.maxResults))
                                    return "maxResults: integer expected";
                            if (message.model != null && message.hasOwnProperty("model"))
                                if (!$util.isString(message.model))
                                    return "model: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Feature message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Feature} Feature
                         */
                        Feature.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Feature)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Feature();
                            switch (object.type) {
                            default:
                                if (typeof object.type === "number") {
                                    message.type = object.type;
                                    break;
                                }
                                break;
                            case "TYPE_UNSPECIFIED":
                            case 0:
                                message.type = 0;
                                break;
                            case "FACE_DETECTION":
                            case 1:
                                message.type = 1;
                                break;
                            case "LANDMARK_DETECTION":
                            case 2:
                                message.type = 2;
                                break;
                            case "LOGO_DETECTION":
                            case 3:
                                message.type = 3;
                                break;
                            case "LABEL_DETECTION":
                            case 4:
                                message.type = 4;
                                break;
                            case "TEXT_DETECTION":
                            case 5:
                                message.type = 5;
                                break;
                            case "DOCUMENT_TEXT_DETECTION":
                            case 11:
                                message.type = 11;
                                break;
                            case "SAFE_SEARCH_DETECTION":
                            case 6:
                                message.type = 6;
                                break;
                            case "IMAGE_PROPERTIES":
                            case 7:
                                message.type = 7;
                                break;
                            case "CROP_HINTS":
                            case 9:
                                message.type = 9;
                                break;
                            case "WEB_DETECTION":
                            case 10:
                                message.type = 10;
                                break;
                            case "PRODUCT_SEARCH":
                            case 12:
                                message.type = 12;
                                break;
                            case "OBJECT_LOCALIZATION":
                            case 19:
                                message.type = 19;
                                break;
                            }
                            if (object.maxResults != null)
                                message.maxResults = object.maxResults | 0;
                            if (object.model != null)
                                message.model = String(object.model);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Feature message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Feature} message Feature
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Feature.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
                                object.maxResults = 0;
                                object.model = "";
                            }
                            if (message.type != null && message.hasOwnProperty("type"))
                                object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.Feature.Type[message.type] : message.type;
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                object.maxResults = message.maxResults;
                            if (message.model != null && message.hasOwnProperty("model"))
                                object.model = message.model;
                            return object;
                        };
    
                        /**
                         * Converts this Feature to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Feature.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Feature
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Feature
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Feature.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Feature";
                        };
    
                        /**
                         * Type enum.
                         * @name google.cloud.vision.v1p3beta1.Feature.Type
                         * @enum {number}
                         * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
                         * @property {number} FACE_DETECTION=1 FACE_DETECTION value
                         * @property {number} LANDMARK_DETECTION=2 LANDMARK_DETECTION value
                         * @property {number} LOGO_DETECTION=3 LOGO_DETECTION value
                         * @property {number} LABEL_DETECTION=4 LABEL_DETECTION value
                         * @property {number} TEXT_DETECTION=5 TEXT_DETECTION value
                         * @property {number} DOCUMENT_TEXT_DETECTION=11 DOCUMENT_TEXT_DETECTION value
                         * @property {number} SAFE_SEARCH_DETECTION=6 SAFE_SEARCH_DETECTION value
                         * @property {number} IMAGE_PROPERTIES=7 IMAGE_PROPERTIES value
                         * @property {number} CROP_HINTS=9 CROP_HINTS value
                         * @property {number} WEB_DETECTION=10 WEB_DETECTION value
                         * @property {number} PRODUCT_SEARCH=12 PRODUCT_SEARCH value
                         * @property {number} OBJECT_LOCALIZATION=19 OBJECT_LOCALIZATION value
                         */
                        Feature.Type = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "FACE_DETECTION"] = 1;
                            values[valuesById[2] = "LANDMARK_DETECTION"] = 2;
                            values[valuesById[3] = "LOGO_DETECTION"] = 3;
                            values[valuesById[4] = "LABEL_DETECTION"] = 4;
                            values[valuesById[5] = "TEXT_DETECTION"] = 5;
                            values[valuesById[11] = "DOCUMENT_TEXT_DETECTION"] = 11;
                            values[valuesById[6] = "SAFE_SEARCH_DETECTION"] = 6;
                            values[valuesById[7] = "IMAGE_PROPERTIES"] = 7;
                            values[valuesById[9] = "CROP_HINTS"] = 9;
                            values[valuesById[10] = "WEB_DETECTION"] = 10;
                            values[valuesById[12] = "PRODUCT_SEARCH"] = 12;
                            values[valuesById[19] = "OBJECT_LOCALIZATION"] = 19;
                            return values;
                        })();
    
                        return Feature;
                    })();
    
                    v1p3beta1.ImageSource = (function() {
    
                        /**
                         * Properties of an ImageSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImageSource
                         * @property {string|null} [gcsImageUri] ImageSource gcsImageUri
                         * @property {string|null} [imageUri] ImageSource imageUri
                         */
    
                        /**
                         * Constructs a new ImageSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImageSource.
                         * @implements IImageSource
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImageSource=} [properties] Properties to set
                         */
                        function ImageSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageSource gcsImageUri.
                         * @member {string} gcsImageUri
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.gcsImageUri = "";
    
                        /**
                         * ImageSource imageUri.
                         * @member {string} imageUri
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.imageUri = "";
    
                        /**
                         * Creates a new ImageSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImageSource} ImageSource instance
                         */
                        ImageSource.create = function create(properties) {
                            return new ImageSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsImageUri != null && Object.hasOwnProperty.call(message, "gcsImageUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsImageUri);
                            if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImageSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsImageUri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.imageUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                if (!$util.isString(message.gcsImageUri))
                                    return "gcsImageUri: string expected";
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                if (!$util.isString(message.imageUri))
                                    return "imageUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImageSource} ImageSource
                         */
                        ImageSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImageSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImageSource();
                            if (object.gcsImageUri != null)
                                message.gcsImageUri = String(object.gcsImageUri);
                            if (object.imageUri != null)
                                message.imageUri = String(object.imageUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImageSource} message ImageSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsImageUri = "";
                                object.imageUri = "";
                            }
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                object.gcsImageUri = message.gcsImageUri;
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                object.imageUri = message.imageUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImageSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImageSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImageSource";
                        };
    
                        return ImageSource;
                    })();
    
                    v1p3beta1.Image = (function() {
    
                        /**
                         * Properties of an Image.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImage
                         * @property {Uint8Array|null} [content] Image content
                         * @property {google.cloud.vision.v1p3beta1.IImageSource|null} [source] Image source
                         */
    
                        /**
                         * Constructs a new Image.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an Image.
                         * @implements IImage
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImage=} [properties] Properties to set
                         */
                        function Image(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Image content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @instance
                         */
                        Image.prototype.content = $util.newBuffer([]);
    
                        /**
                         * Image source.
                         * @member {google.cloud.vision.v1p3beta1.IImageSource|null|undefined} source
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @instance
                         */
                        Image.prototype.source = null;
    
                        /**
                         * Creates a new Image instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Image} Image instance
                         */
                        Image.create = function create(properties) {
                            return new Image(properties);
                        };
    
                        /**
                         * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Image.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
                            if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                                $root.google.cloud.vision.v1p3beta1.ImageSource.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Image.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Image();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.source = $root.google.cloud.vision.v1p3beta1.ImageSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an Image message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Image.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.source != null && message.hasOwnProperty("source")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImageSource.verify(message.source);
                                if (error)
                                    return "source." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an Image message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Image} Image
                         */
                        Image.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Image)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Image();
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.source != null) {
                                if (typeof object.source !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Image.source: object expected");
                                message.source = $root.google.cloud.vision.v1p3beta1.ImageSource.fromObject(object.source);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an Image message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Image} message Image
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Image.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                                object.source = null;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            if (message.source != null && message.hasOwnProperty("source"))
                                object.source = $root.google.cloud.vision.v1p3beta1.ImageSource.toObject(message.source, options);
                            return object;
                        };
    
                        /**
                         * Converts this Image to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Image.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Image
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Image
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Image";
                        };
    
                        return Image;
                    })();
    
                    v1p3beta1.FaceAnnotation = (function() {
    
                        /**
                         * Properties of a FaceAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IFaceAnnotation
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] FaceAnnotation boundingPoly
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [fdBoundingPoly] FaceAnnotation fdBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark>|null} [landmarks] FaceAnnotation landmarks
                         * @property {number|null} [rollAngle] FaceAnnotation rollAngle
                         * @property {number|null} [panAngle] FaceAnnotation panAngle
                         * @property {number|null} [tiltAngle] FaceAnnotation tiltAngle
                         * @property {number|null} [detectionConfidence] FaceAnnotation detectionConfidence
                         * @property {number|null} [landmarkingConfidence] FaceAnnotation landmarkingConfidence
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [joyLikelihood] FaceAnnotation joyLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [sorrowLikelihood] FaceAnnotation sorrowLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [angerLikelihood] FaceAnnotation angerLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [surpriseLikelihood] FaceAnnotation surpriseLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [underExposedLikelihood] FaceAnnotation underExposedLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [blurredLikelihood] FaceAnnotation blurredLikelihood
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [headwearLikelihood] FaceAnnotation headwearLikelihood
                         */
    
                        /**
                         * Constructs a new FaceAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a FaceAnnotation.
                         * @implements IFaceAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IFaceAnnotation=} [properties] Properties to set
                         */
                        function FaceAnnotation(properties) {
                            this.landmarks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * FaceAnnotation fdBoundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} fdBoundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.fdBoundingPoly = null;
    
                        /**
                         * FaceAnnotation landmarks.
                         * @member {Array.<google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark>} landmarks
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarks = $util.emptyArray;
    
                        /**
                         * FaceAnnotation rollAngle.
                         * @member {number} rollAngle
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.rollAngle = 0;
    
                        /**
                         * FaceAnnotation panAngle.
                         * @member {number} panAngle
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.panAngle = 0;
    
                        /**
                         * FaceAnnotation tiltAngle.
                         * @member {number} tiltAngle
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.tiltAngle = 0;
    
                        /**
                         * FaceAnnotation detectionConfidence.
                         * @member {number} detectionConfidence
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.detectionConfidence = 0;
    
                        /**
                         * FaceAnnotation landmarkingConfidence.
                         * @member {number} landmarkingConfidence
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarkingConfidence = 0;
    
                        /**
                         * FaceAnnotation joyLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} joyLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.joyLikelihood = 0;
    
                        /**
                         * FaceAnnotation sorrowLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} sorrowLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.sorrowLikelihood = 0;
    
                        /**
                         * FaceAnnotation angerLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} angerLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.angerLikelihood = 0;
    
                        /**
                         * FaceAnnotation surpriseLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} surpriseLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.surpriseLikelihood = 0;
    
                        /**
                         * FaceAnnotation underExposedLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} underExposedLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.underExposedLikelihood = 0;
    
                        /**
                         * FaceAnnotation blurredLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} blurredLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.blurredLikelihood = 0;
    
                        /**
                         * FaceAnnotation headwearLikelihood.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} headwearLikelihood
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.headwearLikelihood = 0;
    
                        /**
                         * Creates a new FaceAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFaceAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation} FaceAnnotation instance
                         */
                        FaceAnnotation.create = function create(properties) {
                            return new FaceAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.FaceAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fdBoundingPoly != null && Object.hasOwnProperty.call(message, "fdBoundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.fdBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.landmarks != null && message.landmarks.length)
                                for (var i = 0; i < message.landmarks.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.encode(message.landmarks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.rollAngle != null && Object.hasOwnProperty.call(message, "rollAngle"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.rollAngle);
                            if (message.panAngle != null && Object.hasOwnProperty.call(message, "panAngle"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.panAngle);
                            if (message.tiltAngle != null && Object.hasOwnProperty.call(message, "tiltAngle"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.tiltAngle);
                            if (message.detectionConfidence != null && Object.hasOwnProperty.call(message, "detectionConfidence"))
                                writer.uint32(/* id 7, wireType 5 =*/61).float(message.detectionConfidence);
                            if (message.landmarkingConfidence != null && Object.hasOwnProperty.call(message, "landmarkingConfidence"))
                                writer.uint32(/* id 8, wireType 5 =*/69).float(message.landmarkingConfidence);
                            if (message.joyLikelihood != null && Object.hasOwnProperty.call(message, "joyLikelihood"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.joyLikelihood);
                            if (message.sorrowLikelihood != null && Object.hasOwnProperty.call(message, "sorrowLikelihood"))
                                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.sorrowLikelihood);
                            if (message.angerLikelihood != null && Object.hasOwnProperty.call(message, "angerLikelihood"))
                                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.angerLikelihood);
                            if (message.surpriseLikelihood != null && Object.hasOwnProperty.call(message, "surpriseLikelihood"))
                                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.surpriseLikelihood);
                            if (message.underExposedLikelihood != null && Object.hasOwnProperty.call(message, "underExposedLikelihood"))
                                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.underExposedLikelihood);
                            if (message.blurredLikelihood != null && Object.hasOwnProperty.call(message, "blurredLikelihood"))
                                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.blurredLikelihood);
                            if (message.headwearLikelihood != null && Object.hasOwnProperty.call(message, "headwearLikelihood"))
                                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.headwearLikelihood);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.FaceAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.FaceAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.fdBoundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.landmarks && message.landmarks.length))
                                            message.landmarks = [];
                                        message.landmarks.push($root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.rollAngle = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.panAngle = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.tiltAngle = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.detectionConfidence = reader.float();
                                        break;
                                    }
                                case 8: {
                                        message.landmarkingConfidence = reader.float();
                                        break;
                                    }
                                case 9: {
                                        message.joyLikelihood = reader.int32();
                                        break;
                                    }
                                case 10: {
                                        message.sorrowLikelihood = reader.int32();
                                        break;
                                    }
                                case 11: {
                                        message.angerLikelihood = reader.int32();
                                        break;
                                    }
                                case 12: {
                                        message.surpriseLikelihood = reader.int32();
                                        break;
                                    }
                                case 13: {
                                        message.underExposedLikelihood = reader.int32();
                                        break;
                                    }
                                case 14: {
                                        message.blurredLikelihood = reader.int32();
                                        break;
                                    }
                                case 15: {
                                        message.headwearLikelihood = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.fdBoundingPoly);
                                if (error)
                                    return "fdBoundingPoly." + error;
                            }
                            if (message.landmarks != null && message.hasOwnProperty("landmarks")) {
                                if (!Array.isArray(message.landmarks))
                                    return "landmarks: array expected";
                                for (var i = 0; i < message.landmarks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.verify(message.landmarks[i]);
                                    if (error)
                                        return "landmarks." + error;
                                }
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                if (typeof message.rollAngle !== "number")
                                    return "rollAngle: number expected";
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                if (typeof message.panAngle !== "number")
                                    return "panAngle: number expected";
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                if (typeof message.tiltAngle !== "number")
                                    return "tiltAngle: number expected";
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                if (typeof message.detectionConfidence !== "number")
                                    return "detectionConfidence: number expected";
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                if (typeof message.landmarkingConfidence !== "number")
                                    return "landmarkingConfidence: number expected";
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                switch (message.joyLikelihood) {
                                default:
                                    return "joyLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                switch (message.sorrowLikelihood) {
                                default:
                                    return "sorrowLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                switch (message.angerLikelihood) {
                                default:
                                    return "angerLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                switch (message.surpriseLikelihood) {
                                default:
                                    return "surpriseLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                switch (message.underExposedLikelihood) {
                                default:
                                    return "underExposedLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                switch (message.blurredLikelihood) {
                                default:
                                    return "blurredLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                switch (message.headwearLikelihood) {
                                default:
                                    return "headwearLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a FaceAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation} FaceAnnotation
                         */
                        FaceAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.FaceAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.FaceAnnotation();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.FaceAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.fdBoundingPoly != null) {
                                if (typeof object.fdBoundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.FaceAnnotation.fdBoundingPoly: object expected");
                                message.fdBoundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.fdBoundingPoly);
                            }
                            if (object.landmarks) {
                                if (!Array.isArray(object.landmarks))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.FaceAnnotation.landmarks: array expected");
                                message.landmarks = [];
                                for (var i = 0; i < object.landmarks.length; ++i) {
                                    if (typeof object.landmarks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.FaceAnnotation.landmarks: object expected");
                                    message.landmarks[i] = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.fromObject(object.landmarks[i]);
                                }
                            }
                            if (object.rollAngle != null)
                                message.rollAngle = Number(object.rollAngle);
                            if (object.panAngle != null)
                                message.panAngle = Number(object.panAngle);
                            if (object.tiltAngle != null)
                                message.tiltAngle = Number(object.tiltAngle);
                            if (object.detectionConfidence != null)
                                message.detectionConfidence = Number(object.detectionConfidence);
                            if (object.landmarkingConfidence != null)
                                message.landmarkingConfidence = Number(object.landmarkingConfidence);
                            switch (object.joyLikelihood) {
                            default:
                                if (typeof object.joyLikelihood === "number") {
                                    message.joyLikelihood = object.joyLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.joyLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.joyLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.joyLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.joyLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.joyLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.joyLikelihood = 5;
                                break;
                            }
                            switch (object.sorrowLikelihood) {
                            default:
                                if (typeof object.sorrowLikelihood === "number") {
                                    message.sorrowLikelihood = object.sorrowLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.sorrowLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.sorrowLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.sorrowLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.sorrowLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.sorrowLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.sorrowLikelihood = 5;
                                break;
                            }
                            switch (object.angerLikelihood) {
                            default:
                                if (typeof object.angerLikelihood === "number") {
                                    message.angerLikelihood = object.angerLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.angerLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.angerLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.angerLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.angerLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.angerLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.angerLikelihood = 5;
                                break;
                            }
                            switch (object.surpriseLikelihood) {
                            default:
                                if (typeof object.surpriseLikelihood === "number") {
                                    message.surpriseLikelihood = object.surpriseLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.surpriseLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.surpriseLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.surpriseLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.surpriseLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.surpriseLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.surpriseLikelihood = 5;
                                break;
                            }
                            switch (object.underExposedLikelihood) {
                            default:
                                if (typeof object.underExposedLikelihood === "number") {
                                    message.underExposedLikelihood = object.underExposedLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.underExposedLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.underExposedLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.underExposedLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.underExposedLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.underExposedLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.underExposedLikelihood = 5;
                                break;
                            }
                            switch (object.blurredLikelihood) {
                            default:
                                if (typeof object.blurredLikelihood === "number") {
                                    message.blurredLikelihood = object.blurredLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blurredLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.blurredLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.blurredLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.blurredLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.blurredLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.blurredLikelihood = 5;
                                break;
                            }
                            switch (object.headwearLikelihood) {
                            default:
                                if (typeof object.headwearLikelihood === "number") {
                                    message.headwearLikelihood = object.headwearLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.headwearLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.headwearLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.headwearLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.headwearLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.headwearLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.headwearLikelihood = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.FaceAnnotation} message FaceAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.landmarks = [];
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.fdBoundingPoly = null;
                                object.rollAngle = 0;
                                object.panAngle = 0;
                                object.tiltAngle = 0;
                                object.detectionConfidence = 0;
                                object.landmarkingConfidence = 0;
                                object.joyLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.sorrowLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.angerLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.surpriseLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.underExposedLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.blurredLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.headwearLikelihood = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly"))
                                object.fdBoundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.fdBoundingPoly, options);
                            if (message.landmarks && message.landmarks.length) {
                                object.landmarks = [];
                                for (var j = 0; j < message.landmarks.length; ++j)
                                    object.landmarks[j] = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.toObject(message.landmarks[j], options);
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                object.rollAngle = options.json && !isFinite(message.rollAngle) ? String(message.rollAngle) : message.rollAngle;
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                object.panAngle = options.json && !isFinite(message.panAngle) ? String(message.panAngle) : message.panAngle;
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                object.tiltAngle = options.json && !isFinite(message.tiltAngle) ? String(message.tiltAngle) : message.tiltAngle;
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                object.detectionConfidence = options.json && !isFinite(message.detectionConfidence) ? String(message.detectionConfidence) : message.detectionConfidence;
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence;
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood;
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood;
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood;
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood;
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood;
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood;
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p3beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood;
                            return object;
                        };
    
                        /**
                         * Converts this FaceAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.FaceAnnotation";
                        };
    
                        FaceAnnotation.Landmark = (function() {
    
                            /**
                             * Properties of a Landmark.
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                             * @interface ILandmark
                             * @property {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type|null} [type] Landmark type
                             * @property {google.cloud.vision.v1p3beta1.IPosition|null} [position] Landmark position
                             */
    
                            /**
                             * Constructs a new Landmark.
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation
                             * @classdesc Represents a Landmark.
                             * @implements ILandmark
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             */
                            function Landmark(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Landmark type.
                             * @member {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type} type
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.type = 0;
    
                            /**
                             * Landmark position.
                             * @member {google.cloud.vision.v1p3beta1.IPosition|null|undefined} position
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.position = null;
    
                            /**
                             * Creates a new Landmark instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} Landmark instance
                             */
                            Landmark.create = function create(properties) {
                                return new Landmark(properties);
                            };
    
                            /**
                             * Encodes the specified Landmark message. Does not implicitly {@link google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                                if (message.position != null && Object.hasOwnProperty.call(message, "position"))
                                    $root.google.cloud.vision.v1p3beta1.Position.encode(message.position, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Landmark message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 3: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 4: {
                                            message.position = $root.google.cloud.vision.v1p3beta1.Position.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Landmark message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Landmark.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case 6:
                                    case 7:
                                    case 8:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                    case 33:
                                    case 34:
                                        break;
                                    }
                                if (message.position != null && message.hasOwnProperty("position")) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Position.verify(message.position);
                                    if (error)
                                        return "position." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a Landmark message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} Landmark
                             */
                            Landmark.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN_LANDMARK":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "LEFT_EYE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "RIGHT_EYE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "LEFT_OF_LEFT_EYEBROW":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "RIGHT_OF_LEFT_EYEBROW":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LEFT_OF_RIGHT_EYEBROW":
                                case 5:
                                    message.type = 5;
                                    break;
                                case "RIGHT_OF_RIGHT_EYEBROW":
                                case 6:
                                    message.type = 6;
                                    break;
                                case "MIDPOINT_BETWEEN_EYES":
                                case 7:
                                    message.type = 7;
                                    break;
                                case "NOSE_TIP":
                                case 8:
                                    message.type = 8;
                                    break;
                                case "UPPER_LIP":
                                case 9:
                                    message.type = 9;
                                    break;
                                case "LOWER_LIP":
                                case 10:
                                    message.type = 10;
                                    break;
                                case "MOUTH_LEFT":
                                case 11:
                                    message.type = 11;
                                    break;
                                case "MOUTH_RIGHT":
                                case 12:
                                    message.type = 12;
                                    break;
                                case "MOUTH_CENTER":
                                case 13:
                                    message.type = 13;
                                    break;
                                case "NOSE_BOTTOM_RIGHT":
                                case 14:
                                    message.type = 14;
                                    break;
                                case "NOSE_BOTTOM_LEFT":
                                case 15:
                                    message.type = 15;
                                    break;
                                case "NOSE_BOTTOM_CENTER":
                                case 16:
                                    message.type = 16;
                                    break;
                                case "LEFT_EYE_TOP_BOUNDARY":
                                case 17:
                                    message.type = 17;
                                    break;
                                case "LEFT_EYE_RIGHT_CORNER":
                                case 18:
                                    message.type = 18;
                                    break;
                                case "LEFT_EYE_BOTTOM_BOUNDARY":
                                case 19:
                                    message.type = 19;
                                    break;
                                case "LEFT_EYE_LEFT_CORNER":
                                case 20:
                                    message.type = 20;
                                    break;
                                case "RIGHT_EYE_TOP_BOUNDARY":
                                case 21:
                                    message.type = 21;
                                    break;
                                case "RIGHT_EYE_RIGHT_CORNER":
                                case 22:
                                    message.type = 22;
                                    break;
                                case "RIGHT_EYE_BOTTOM_BOUNDARY":
                                case 23:
                                    message.type = 23;
                                    break;
                                case "RIGHT_EYE_LEFT_CORNER":
                                case 24:
                                    message.type = 24;
                                    break;
                                case "LEFT_EYEBROW_UPPER_MIDPOINT":
                                case 25:
                                    message.type = 25;
                                    break;
                                case "RIGHT_EYEBROW_UPPER_MIDPOINT":
                                case 26:
                                    message.type = 26;
                                    break;
                                case "LEFT_EAR_TRAGION":
                                case 27:
                                    message.type = 27;
                                    break;
                                case "RIGHT_EAR_TRAGION":
                                case 28:
                                    message.type = 28;
                                    break;
                                case "LEFT_EYE_PUPIL":
                                case 29:
                                    message.type = 29;
                                    break;
                                case "RIGHT_EYE_PUPIL":
                                case 30:
                                    message.type = 30;
                                    break;
                                case "FOREHEAD_GLABELLA":
                                case 31:
                                    message.type = 31;
                                    break;
                                case "CHIN_GNATHION":
                                case 32:
                                    message.type = 32;
                                    break;
                                case "CHIN_LEFT_GONION":
                                case 33:
                                    message.type = 33;
                                    break;
                                case "CHIN_RIGHT_GONION":
                                case 34:
                                    message.type = 34;
                                    break;
                                }
                                if (object.position != null) {
                                    if (typeof object.position !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.position: object expected");
                                    message.position = $root.google.cloud.vision.v1p3beta1.Position.fromObject(object.position);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Landmark message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark} message Landmark
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Landmark.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN_LANDMARK" : 0;
                                    object.position = null;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type[message.type] : message.type;
                                if (message.position != null && message.hasOwnProperty("position"))
                                    object.position = $root.google.cloud.vision.v1p3beta1.Position.toObject(message.position, options);
                                return object;
                            };
    
                            /**
                             * Converts this Landmark to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Landmark.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Landmark
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Landmark.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark";
                            };
    
                            /**
                             * Type enum.
                             * @name google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Type
                             * @enum {number}
                             * @property {number} UNKNOWN_LANDMARK=0 UNKNOWN_LANDMARK value
                             * @property {number} LEFT_EYE=1 LEFT_EYE value
                             * @property {number} RIGHT_EYE=2 RIGHT_EYE value
                             * @property {number} LEFT_OF_LEFT_EYEBROW=3 LEFT_OF_LEFT_EYEBROW value
                             * @property {number} RIGHT_OF_LEFT_EYEBROW=4 RIGHT_OF_LEFT_EYEBROW value
                             * @property {number} LEFT_OF_RIGHT_EYEBROW=5 LEFT_OF_RIGHT_EYEBROW value
                             * @property {number} RIGHT_OF_RIGHT_EYEBROW=6 RIGHT_OF_RIGHT_EYEBROW value
                             * @property {number} MIDPOINT_BETWEEN_EYES=7 MIDPOINT_BETWEEN_EYES value
                             * @property {number} NOSE_TIP=8 NOSE_TIP value
                             * @property {number} UPPER_LIP=9 UPPER_LIP value
                             * @property {number} LOWER_LIP=10 LOWER_LIP value
                             * @property {number} MOUTH_LEFT=11 MOUTH_LEFT value
                             * @property {number} MOUTH_RIGHT=12 MOUTH_RIGHT value
                             * @property {number} MOUTH_CENTER=13 MOUTH_CENTER value
                             * @property {number} NOSE_BOTTOM_RIGHT=14 NOSE_BOTTOM_RIGHT value
                             * @property {number} NOSE_BOTTOM_LEFT=15 NOSE_BOTTOM_LEFT value
                             * @property {number} NOSE_BOTTOM_CENTER=16 NOSE_BOTTOM_CENTER value
                             * @property {number} LEFT_EYE_TOP_BOUNDARY=17 LEFT_EYE_TOP_BOUNDARY value
                             * @property {number} LEFT_EYE_RIGHT_CORNER=18 LEFT_EYE_RIGHT_CORNER value
                             * @property {number} LEFT_EYE_BOTTOM_BOUNDARY=19 LEFT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} LEFT_EYE_LEFT_CORNER=20 LEFT_EYE_LEFT_CORNER value
                             * @property {number} RIGHT_EYE_TOP_BOUNDARY=21 RIGHT_EYE_TOP_BOUNDARY value
                             * @property {number} RIGHT_EYE_RIGHT_CORNER=22 RIGHT_EYE_RIGHT_CORNER value
                             * @property {number} RIGHT_EYE_BOTTOM_BOUNDARY=23 RIGHT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} RIGHT_EYE_LEFT_CORNER=24 RIGHT_EYE_LEFT_CORNER value
                             * @property {number} LEFT_EYEBROW_UPPER_MIDPOINT=25 LEFT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} RIGHT_EYEBROW_UPPER_MIDPOINT=26 RIGHT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} LEFT_EAR_TRAGION=27 LEFT_EAR_TRAGION value
                             * @property {number} RIGHT_EAR_TRAGION=28 RIGHT_EAR_TRAGION value
                             * @property {number} LEFT_EYE_PUPIL=29 LEFT_EYE_PUPIL value
                             * @property {number} RIGHT_EYE_PUPIL=30 RIGHT_EYE_PUPIL value
                             * @property {number} FOREHEAD_GLABELLA=31 FOREHEAD_GLABELLA value
                             * @property {number} CHIN_GNATHION=32 CHIN_GNATHION value
                             * @property {number} CHIN_LEFT_GONION=33 CHIN_LEFT_GONION value
                             * @property {number} CHIN_RIGHT_GONION=34 CHIN_RIGHT_GONION value
                             */
                            Landmark.Type = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN_LANDMARK"] = 0;
                                values[valuesById[1] = "LEFT_EYE"] = 1;
                                values[valuesById[2] = "RIGHT_EYE"] = 2;
                                values[valuesById[3] = "LEFT_OF_LEFT_EYEBROW"] = 3;
                                values[valuesById[4] = "RIGHT_OF_LEFT_EYEBROW"] = 4;
                                values[valuesById[5] = "LEFT_OF_RIGHT_EYEBROW"] = 5;
                                values[valuesById[6] = "RIGHT_OF_RIGHT_EYEBROW"] = 6;
                                values[valuesById[7] = "MIDPOINT_BETWEEN_EYES"] = 7;
                                values[valuesById[8] = "NOSE_TIP"] = 8;
                                values[valuesById[9] = "UPPER_LIP"] = 9;
                                values[valuesById[10] = "LOWER_LIP"] = 10;
                                values[valuesById[11] = "MOUTH_LEFT"] = 11;
                                values[valuesById[12] = "MOUTH_RIGHT"] = 12;
                                values[valuesById[13] = "MOUTH_CENTER"] = 13;
                                values[valuesById[14] = "NOSE_BOTTOM_RIGHT"] = 14;
                                values[valuesById[15] = "NOSE_BOTTOM_LEFT"] = 15;
                                values[valuesById[16] = "NOSE_BOTTOM_CENTER"] = 16;
                                values[valuesById[17] = "LEFT_EYE_TOP_BOUNDARY"] = 17;
                                values[valuesById[18] = "LEFT_EYE_RIGHT_CORNER"] = 18;
                                values[valuesById[19] = "LEFT_EYE_BOTTOM_BOUNDARY"] = 19;
                                values[valuesById[20] = "LEFT_EYE_LEFT_CORNER"] = 20;
                                values[valuesById[21] = "RIGHT_EYE_TOP_BOUNDARY"] = 21;
                                values[valuesById[22] = "RIGHT_EYE_RIGHT_CORNER"] = 22;
                                values[valuesById[23] = "RIGHT_EYE_BOTTOM_BOUNDARY"] = 23;
                                values[valuesById[24] = "RIGHT_EYE_LEFT_CORNER"] = 24;
                                values[valuesById[25] = "LEFT_EYEBROW_UPPER_MIDPOINT"] = 25;
                                values[valuesById[26] = "RIGHT_EYEBROW_UPPER_MIDPOINT"] = 26;
                                values[valuesById[27] = "LEFT_EAR_TRAGION"] = 27;
                                values[valuesById[28] = "RIGHT_EAR_TRAGION"] = 28;
                                values[valuesById[29] = "LEFT_EYE_PUPIL"] = 29;
                                values[valuesById[30] = "RIGHT_EYE_PUPIL"] = 30;
                                values[valuesById[31] = "FOREHEAD_GLABELLA"] = 31;
                                values[valuesById[32] = "CHIN_GNATHION"] = 32;
                                values[valuesById[33] = "CHIN_LEFT_GONION"] = 33;
                                values[valuesById[34] = "CHIN_RIGHT_GONION"] = 34;
                                return values;
                            })();
    
                            return Landmark;
                        })();
    
                        return FaceAnnotation;
                    })();
    
                    v1p3beta1.LocationInfo = (function() {
    
                        /**
                         * Properties of a LocationInfo.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ILocationInfo
                         * @property {google.type.ILatLng|null} [latLng] LocationInfo latLng
                         */
    
                        /**
                         * Constructs a new LocationInfo.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a LocationInfo.
                         * @implements ILocationInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ILocationInfo=} [properties] Properties to set
                         */
                        function LocationInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocationInfo latLng.
                         * @member {google.type.ILatLng|null|undefined} latLng
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @instance
                         */
                        LocationInfo.prototype.latLng = null;
    
                        /**
                         * Creates a new LocationInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocationInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.LocationInfo} LocationInfo instance
                         */
                        LocationInfo.create = function create(properties) {
                            return new LocationInfo(properties);
                        };
    
                        /**
                         * Encodes the specified LocationInfo message. Does not implicitly {@link google.cloud.vision.v1p3beta1.LocationInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
                                $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocationInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.LocationInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.LocationInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocationInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocationInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLng != null && message.hasOwnProperty("latLng")) {
                                var error = $root.google.type.LatLng.verify(message.latLng);
                                if (error)
                                    return "latLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocationInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.LocationInfo} LocationInfo
                         */
                        LocationInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.LocationInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.LocationInfo();
                            if (object.latLng != null) {
                                if (typeof object.latLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.LocationInfo.latLng: object expected");
                                message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocationInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.LocationInfo} message LocationInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocationInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.latLng = null;
                            if (message.latLng != null && message.hasOwnProperty("latLng"))
                                object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocationInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocationInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocationInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.LocationInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.LocationInfo";
                        };
    
                        return LocationInfo;
                    })();
    
                    v1p3beta1.Property = (function() {
    
                        /**
                         * Properties of a Property.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IProperty
                         * @property {string|null} [name] Property name
                         * @property {string|null} [value] Property value
                         * @property {number|Long|null} [uint64Value] Property uint64Value
                         */
    
                        /**
                         * Constructs a new Property.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Property.
                         * @implements IProperty
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IProperty=} [properties] Properties to set
                         */
                        function Property(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Property name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @instance
                         */
                        Property.prototype.name = "";
    
                        /**
                         * Property value.
                         * @member {string} value
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @instance
                         */
                        Property.prototype.value = "";
    
                        /**
                         * Property uint64Value.
                         * @member {number|Long} uint64Value
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @instance
                         */
                        Property.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                        /**
                         * Creates a new Property instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProperty=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Property} Property instance
                         */
                        Property.create = function create(properties) {
                            return new Property(properties);
                        };
    
                        /**
                         * Encodes the specified Property message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Property.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                            if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Property.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Property();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.value = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.uint64Value = reader.uint64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Property message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Property.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.value != null && message.hasOwnProperty("value"))
                                if (!$util.isString(message.value))
                                    return "value: string expected";
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high)))
                                    return "uint64Value: integer|Long expected";
                            return null;
                        };
    
                        /**
                         * Creates a Property message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Property} Property
                         */
                        Property.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Property)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Property();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.value != null)
                                message.value = String(object.value);
                            if (object.uint64Value != null)
                                if ($util.Long)
                                    (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true;
                                else if (typeof object.uint64Value === "string")
                                    message.uint64Value = parseInt(object.uint64Value, 10);
                                else if (typeof object.uint64Value === "number")
                                    message.uint64Value = object.uint64Value;
                                else if (typeof object.uint64Value === "object")
                                    message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Property message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Property} message Property
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Property.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.value = "";
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, true);
                                    object.uint64Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.uint64Value = options.longs === String ? "0" : 0;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.value != null && message.hasOwnProperty("value"))
                                object.value = message.value;
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (typeof message.uint64Value === "number")
                                    object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value;
                                else
                                    object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value;
                            return object;
                        };
    
                        /**
                         * Converts this Property to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Property.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Property
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Property
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Property";
                        };
    
                        return Property;
                    })();
    
                    v1p3beta1.EntityAnnotation = (function() {
    
                        /**
                         * Properties of an EntityAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IEntityAnnotation
                         * @property {string|null} [mid] EntityAnnotation mid
                         * @property {string|null} [locale] EntityAnnotation locale
                         * @property {string|null} [description] EntityAnnotation description
                         * @property {number|null} [score] EntityAnnotation score
                         * @property {number|null} [confidence] EntityAnnotation confidence
                         * @property {number|null} [topicality] EntityAnnotation topicality
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] EntityAnnotation boundingPoly
                         * @property {Array.<google.cloud.vision.v1p3beta1.ILocationInfo>|null} [locations] EntityAnnotation locations
                         * @property {Array.<google.cloud.vision.v1p3beta1.IProperty>|null} [properties] EntityAnnotation properties
                         */
    
                        /**
                         * Constructs a new EntityAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an EntityAnnotation.
                         * @implements IEntityAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IEntityAnnotation=} [properties] Properties to set
                         */
                        function EntityAnnotation(properties) {
                            this.locations = [];
                            this.properties = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * EntityAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.mid = "";
    
                        /**
                         * EntityAnnotation locale.
                         * @member {string} locale
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locale = "";
    
                        /**
                         * EntityAnnotation description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.description = "";
    
                        /**
                         * EntityAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.score = 0;
    
                        /**
                         * EntityAnnotation confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.confidence = 0;
    
                        /**
                         * EntityAnnotation topicality.
                         * @member {number} topicality
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.topicality = 0;
    
                        /**
                         * EntityAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * EntityAnnotation locations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ILocationInfo>} locations
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locations = $util.emptyArray;
    
                        /**
                         * EntityAnnotation properties.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IProperty>} properties
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.properties = $util.emptyArray;
    
                        /**
                         * Creates a new EntityAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IEntityAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.EntityAnnotation} EntityAnnotation instance
                         */
                        EntityAnnotation.create = function create(properties) {
                            return new EntityAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.EntityAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.locale != null && Object.hasOwnProperty.call(message, "locale"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.locale);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            if (message.topicality != null && Object.hasOwnProperty.call(message, "topicality"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.topicality);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                            if (message.locations != null && message.locations.length)
                                for (var i = 0; i < message.locations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.LocationInfo.encode(message.locations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.properties != null && message.properties.length)
                                for (var i = 0; i < message.properties.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Property.encode(message.properties[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.EntityAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.EntityAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.locale = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.topicality = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        if (!(message.locations && message.locations.length))
                                            message.locations = [];
                                        message.locations.push($root.google.cloud.vision.v1p3beta1.LocationInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 9: {
                                        if (!(message.properties && message.properties.length))
                                            message.properties = [];
                                        message.properties.push($root.google.cloud.vision.v1p3beta1.Property.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an EntityAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        EntityAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                if (!$util.isString(message.locale))
                                    return "locale: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                if (typeof message.topicality !== "number")
                                    return "topicality: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.locations != null && message.hasOwnProperty("locations")) {
                                if (!Array.isArray(message.locations))
                                    return "locations: array expected";
                                for (var i = 0; i < message.locations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.LocationInfo.verify(message.locations[i]);
                                    if (error)
                                        return "locations." + error;
                                }
                            }
                            if (message.properties != null && message.hasOwnProperty("properties")) {
                                if (!Array.isArray(message.properties))
                                    return "properties: array expected";
                                for (var i = 0; i < message.properties.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Property.verify(message.properties[i]);
                                    if (error)
                                        return "properties." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an EntityAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.EntityAnnotation} EntityAnnotation
                         */
                        EntityAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.EntityAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.EntityAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.locale != null)
                                message.locale = String(object.locale);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.topicality != null)
                                message.topicality = Number(object.topicality);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.EntityAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.locations) {
                                if (!Array.isArray(object.locations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.EntityAnnotation.locations: array expected");
                                message.locations = [];
                                for (var i = 0; i < object.locations.length; ++i) {
                                    if (typeof object.locations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.EntityAnnotation.locations: object expected");
                                    message.locations[i] = $root.google.cloud.vision.v1p3beta1.LocationInfo.fromObject(object.locations[i]);
                                }
                            }
                            if (object.properties) {
                                if (!Array.isArray(object.properties))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.EntityAnnotation.properties: array expected");
                                message.properties = [];
                                for (var i = 0; i < object.properties.length; ++i) {
                                    if (typeof object.properties[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.EntityAnnotation.properties: object expected");
                                    message.properties[i] = $root.google.cloud.vision.v1p3beta1.Property.fromObject(object.properties[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an EntityAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.EntityAnnotation} message EntityAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        EntityAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.locations = [];
                                object.properties = [];
                            }
                            if (options.defaults) {
                                object.mid = "";
                                object.locale = "";
                                object.description = "";
                                object.score = 0;
                                object.confidence = 0;
                                object.topicality = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                object.locale = message.locale;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                object.topicality = options.json && !isFinite(message.topicality) ? String(message.topicality) : message.topicality;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.locations && message.locations.length) {
                                object.locations = [];
                                for (var j = 0; j < message.locations.length; ++j)
                                    object.locations[j] = $root.google.cloud.vision.v1p3beta1.LocationInfo.toObject(message.locations[j], options);
                            }
                            if (message.properties && message.properties.length) {
                                object.properties = [];
                                for (var j = 0; j < message.properties.length; ++j)
                                    object.properties[j] = $root.google.cloud.vision.v1p3beta1.Property.toObject(message.properties[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this EntityAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        EntityAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for EntityAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.EntityAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        EntityAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.EntityAnnotation";
                        };
    
                        return EntityAnnotation;
                    })();
    
                    v1p3beta1.LocalizedObjectAnnotation = (function() {
    
                        /**
                         * Properties of a LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ILocalizedObjectAnnotation
                         * @property {string|null} [mid] LocalizedObjectAnnotation mid
                         * @property {string|null} [languageCode] LocalizedObjectAnnotation languageCode
                         * @property {string|null} [name] LocalizedObjectAnnotation name
                         * @property {number|null} [score] LocalizedObjectAnnotation score
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] LocalizedObjectAnnotation boundingPoly
                         */
    
                        /**
                         * Constructs a new LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a LocalizedObjectAnnotation.
                         * @implements ILocalizedObjectAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         */
                        function LocalizedObjectAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocalizedObjectAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.mid = "";
    
                        /**
                         * LocalizedObjectAnnotation languageCode.
                         * @member {string} languageCode
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.languageCode = "";
    
                        /**
                         * LocalizedObjectAnnotation name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.name = "";
    
                        /**
                         * LocalizedObjectAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.score = 0;
    
                        /**
                         * LocalizedObjectAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * Creates a new LocalizedObjectAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation instance
                         */
                        LocalizedObjectAnnotation.create = function create(properties) {
                            return new LocalizedObjectAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.languageCode = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocalizedObjectAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocalizedObjectAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                if (!$util.isString(message.languageCode))
                                    return "languageCode: string expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocalizedObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         */
                        LocalizedObjectAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.languageCode != null)
                                message.languageCode = String(object.languageCode);
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocalizedObjectAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation} message LocalizedObjectAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocalizedObjectAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.mid = "";
                                object.languageCode = "";
                                object.name = "";
                                object.score = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                object.languageCode = message.languageCode;
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocalizedObjectAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocalizedObjectAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocalizedObjectAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocalizedObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation";
                        };
    
                        return LocalizedObjectAnnotation;
                    })();
    
                    v1p3beta1.SafeSearchAnnotation = (function() {
    
                        /**
                         * Properties of a SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ISafeSearchAnnotation
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [adult] SafeSearchAnnotation adult
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [spoof] SafeSearchAnnotation spoof
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [medical] SafeSearchAnnotation medical
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [violence] SafeSearchAnnotation violence
                         * @property {google.cloud.vision.v1p3beta1.Likelihood|null} [racy] SafeSearchAnnotation racy
                         */
    
                        /**
                         * Constructs a new SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a SafeSearchAnnotation.
                         * @implements ISafeSearchAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         */
                        function SafeSearchAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * SafeSearchAnnotation adult.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} adult
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.adult = 0;
    
                        /**
                         * SafeSearchAnnotation spoof.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} spoof
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.spoof = 0;
    
                        /**
                         * SafeSearchAnnotation medical.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} medical
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.medical = 0;
    
                        /**
                         * SafeSearchAnnotation violence.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} violence
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.violence = 0;
    
                        /**
                         * SafeSearchAnnotation racy.
                         * @member {google.cloud.vision.v1p3beta1.Likelihood} racy
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.racy = 0;
    
                        /**
                         * Creates a new SafeSearchAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.SafeSearchAnnotation} SafeSearchAnnotation instance
                         */
                        SafeSearchAnnotation.create = function create(properties) {
                            return new SafeSearchAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.adult != null && Object.hasOwnProperty.call(message, "adult"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adult);
                            if (message.spoof != null && Object.hasOwnProperty.call(message, "spoof"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.spoof);
                            if (message.medical != null && Object.hasOwnProperty.call(message, "medical"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.medical);
                            if (message.violence != null && Object.hasOwnProperty.call(message, "violence"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.violence);
                            if (message.racy != null && Object.hasOwnProperty.call(message, "racy"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.racy);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.adult = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.spoof = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.medical = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.violence = reader.int32();
                                        break;
                                    }
                                case 9: {
                                        message.racy = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a SafeSearchAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        SafeSearchAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                switch (message.adult) {
                                default:
                                    return "adult: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                switch (message.spoof) {
                                default:
                                    return "spoof: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                switch (message.medical) {
                                default:
                                    return "medical: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                switch (message.violence) {
                                default:
                                    return "violence: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                switch (message.racy) {
                                default:
                                    return "racy: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a SafeSearchAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         */
                        SafeSearchAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation();
                            switch (object.adult) {
                            default:
                                if (typeof object.adult === "number") {
                                    message.adult = object.adult;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.adult = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.adult = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.adult = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.adult = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.adult = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.adult = 5;
                                break;
                            }
                            switch (object.spoof) {
                            default:
                                if (typeof object.spoof === "number") {
                                    message.spoof = object.spoof;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.spoof = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.spoof = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.spoof = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.spoof = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.spoof = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.spoof = 5;
                                break;
                            }
                            switch (object.medical) {
                            default:
                                if (typeof object.medical === "number") {
                                    message.medical = object.medical;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.medical = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.medical = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.medical = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.medical = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.medical = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.medical = 5;
                                break;
                            }
                            switch (object.violence) {
                            default:
                                if (typeof object.violence === "number") {
                                    message.violence = object.violence;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.violence = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.violence = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.violence = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.violence = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.violence = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.violence = 5;
                                break;
                            }
                            switch (object.racy) {
                            default:
                                if (typeof object.racy === "number") {
                                    message.racy = object.racy;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.racy = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.racy = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.racy = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.racy = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.racy = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.racy = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a SafeSearchAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.SafeSearchAnnotation} message SafeSearchAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        SafeSearchAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.adult = options.enums === String ? "UNKNOWN" : 0;
                                object.spoof = options.enums === String ? "UNKNOWN" : 0;
                                object.medical = options.enums === String ? "UNKNOWN" : 0;
                                object.violence = options.enums === String ? "UNKNOWN" : 0;
                                object.racy = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                object.adult = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p3beta1.Likelihood[message.adult] : message.adult;
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                object.spoof = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p3beta1.Likelihood[message.spoof] : message.spoof;
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                object.medical = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p3beta1.Likelihood[message.medical] : message.medical;
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                object.violence = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p3beta1.Likelihood[message.violence] : message.violence;
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                object.racy = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p3beta1.Likelihood[message.racy] : message.racy;
                            return object;
                        };
    
                        /**
                         * Converts this SafeSearchAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        SafeSearchAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for SafeSearchAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.SafeSearchAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        SafeSearchAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.SafeSearchAnnotation";
                        };
    
                        return SafeSearchAnnotation;
                    })();
    
                    v1p3beta1.LatLongRect = (function() {
    
                        /**
                         * Properties of a LatLongRect.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ILatLongRect
                         * @property {google.type.ILatLng|null} [minLatLng] LatLongRect minLatLng
                         * @property {google.type.ILatLng|null} [maxLatLng] LatLongRect maxLatLng
                         */
    
                        /**
                         * Constructs a new LatLongRect.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a LatLongRect.
                         * @implements ILatLongRect
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ILatLongRect=} [properties] Properties to set
                         */
                        function LatLongRect(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LatLongRect minLatLng.
                         * @member {google.type.ILatLng|null|undefined} minLatLng
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.minLatLng = null;
    
                        /**
                         * LatLongRect maxLatLng.
                         * @member {google.type.ILatLng|null|undefined} maxLatLng
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.maxLatLng = null;
    
                        /**
                         * Creates a new LatLongRect instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILatLongRect=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.LatLongRect} LatLongRect instance
                         */
                        LatLongRect.create = function create(properties) {
                            return new LatLongRect(properties);
                        };
    
                        /**
                         * Encodes the specified LatLongRect message. Does not implicitly {@link google.cloud.vision.v1p3beta1.LatLongRect.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.minLatLng != null && Object.hasOwnProperty.call(message, "minLatLng"))
                                $root.google.type.LatLng.encode(message.minLatLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.maxLatLng != null && Object.hasOwnProperty.call(message, "maxLatLng"))
                                $root.google.type.LatLng.encode(message.maxLatLng, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LatLongRect message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.LatLongRect.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.LatLongRect();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.minLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.maxLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LatLongRect message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LatLongRect.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.minLatLng);
                                if (error)
                                    return "minLatLng." + error;
                            }
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.maxLatLng);
                                if (error)
                                    return "maxLatLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LatLongRect message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.LatLongRect} LatLongRect
                         */
                        LatLongRect.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.LatLongRect)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.LatLongRect();
                            if (object.minLatLng != null) {
                                if (typeof object.minLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.LatLongRect.minLatLng: object expected");
                                message.minLatLng = $root.google.type.LatLng.fromObject(object.minLatLng);
                            }
                            if (object.maxLatLng != null) {
                                if (typeof object.maxLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.LatLongRect.maxLatLng: object expected");
                                message.maxLatLng = $root.google.type.LatLng.fromObject(object.maxLatLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LatLongRect message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.LatLongRect} message LatLongRect
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LatLongRect.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.minLatLng = null;
                                object.maxLatLng = null;
                            }
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng"))
                                object.minLatLng = $root.google.type.LatLng.toObject(message.minLatLng, options);
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng"))
                                object.maxLatLng = $root.google.type.LatLng.toObject(message.maxLatLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LatLongRect to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LatLongRect.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LatLongRect
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.LatLongRect
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LatLongRect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.LatLongRect";
                        };
    
                        return LatLongRect;
                    })();
    
                    v1p3beta1.ColorInfo = (function() {
    
                        /**
                         * Properties of a ColorInfo.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IColorInfo
                         * @property {google.type.IColor|null} [color] ColorInfo color
                         * @property {number|null} [score] ColorInfo score
                         * @property {number|null} [pixelFraction] ColorInfo pixelFraction
                         */
    
                        /**
                         * Constructs a new ColorInfo.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ColorInfo.
                         * @implements IColorInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IColorInfo=} [properties] Properties to set
                         */
                        function ColorInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ColorInfo color.
                         * @member {google.type.IColor|null|undefined} color
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.color = null;
    
                        /**
                         * ColorInfo score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.score = 0;
    
                        /**
                         * ColorInfo pixelFraction.
                         * @member {number} pixelFraction
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.pixelFraction = 0;
    
                        /**
                         * Creates a new ColorInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IColorInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ColorInfo} ColorInfo instance
                         */
                        ColorInfo.create = function create(properties) {
                            return new ColorInfo(properties);
                        };
    
                        /**
                         * Encodes the specified ColorInfo message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ColorInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.color != null && Object.hasOwnProperty.call(message, "color"))
                                $root.google.type.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                            if (message.pixelFraction != null && Object.hasOwnProperty.call(message, "pixelFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.pixelFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ColorInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ColorInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ColorInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.color = $root.google.type.Color.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.pixelFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ColorInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ColorInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.color != null && message.hasOwnProperty("color")) {
                                var error = $root.google.type.Color.verify(message.color);
                                if (error)
                                    return "color." + error;
                            }
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                if (typeof message.pixelFraction !== "number")
                                    return "pixelFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a ColorInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ColorInfo} ColorInfo
                         */
                        ColorInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ColorInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ColorInfo();
                            if (object.color != null) {
                                if (typeof object.color !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ColorInfo.color: object expected");
                                message.color = $root.google.type.Color.fromObject(object.color);
                            }
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.pixelFraction != null)
                                message.pixelFraction = Number(object.pixelFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ColorInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ColorInfo} message ColorInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ColorInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.color = null;
                                object.score = 0;
                                object.pixelFraction = 0;
                            }
                            if (message.color != null && message.hasOwnProperty("color"))
                                object.color = $root.google.type.Color.toObject(message.color, options);
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                object.pixelFraction = options.json && !isFinite(message.pixelFraction) ? String(message.pixelFraction) : message.pixelFraction;
                            return object;
                        };
    
                        /**
                         * Converts this ColorInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ColorInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ColorInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ColorInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ColorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ColorInfo";
                        };
    
                        return ColorInfo;
                    })();
    
                    v1p3beta1.DominantColorsAnnotation = (function() {
    
                        /**
                         * Properties of a DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IDominantColorsAnnotation
                         * @property {Array.<google.cloud.vision.v1p3beta1.IColorInfo>|null} [colors] DominantColorsAnnotation colors
                         */
    
                        /**
                         * Constructs a new DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a DominantColorsAnnotation.
                         * @implements IDominantColorsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         */
                        function DominantColorsAnnotation(properties) {
                            this.colors = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DominantColorsAnnotation colors.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IColorInfo>} colors
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @instance
                         */
                        DominantColorsAnnotation.prototype.colors = $util.emptyArray;
    
                        /**
                         * Creates a new DominantColorsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.DominantColorsAnnotation} DominantColorsAnnotation instance
                         */
                        DominantColorsAnnotation.create = function create(properties) {
                            return new DominantColorsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.colors != null && message.colors.length)
                                for (var i = 0; i < message.colors.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ColorInfo.encode(message.colors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.colors && message.colors.length))
                                            message.colors = [];
                                        message.colors.push($root.google.cloud.vision.v1p3beta1.ColorInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DominantColorsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DominantColorsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.colors != null && message.hasOwnProperty("colors")) {
                                if (!Array.isArray(message.colors))
                                    return "colors: array expected";
                                for (var i = 0; i < message.colors.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ColorInfo.verify(message.colors[i]);
                                    if (error)
                                        return "colors." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a DominantColorsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         */
                        DominantColorsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation();
                            if (object.colors) {
                                if (!Array.isArray(object.colors))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.DominantColorsAnnotation.colors: array expected");
                                message.colors = [];
                                for (var i = 0; i < object.colors.length; ++i) {
                                    if (typeof object.colors[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.DominantColorsAnnotation.colors: object expected");
                                    message.colors[i] = $root.google.cloud.vision.v1p3beta1.ColorInfo.fromObject(object.colors[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DominantColorsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.DominantColorsAnnotation} message DominantColorsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DominantColorsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.colors = [];
                            if (message.colors && message.colors.length) {
                                object.colors = [];
                                for (var j = 0; j < message.colors.length; ++j)
                                    object.colors[j] = $root.google.cloud.vision.v1p3beta1.ColorInfo.toObject(message.colors[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this DominantColorsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DominantColorsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DominantColorsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.DominantColorsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DominantColorsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.DominantColorsAnnotation";
                        };
    
                        return DominantColorsAnnotation;
                    })();
    
                    v1p3beta1.ImageProperties = (function() {
    
                        /**
                         * Properties of an ImageProperties.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImageProperties
                         * @property {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation|null} [dominantColors] ImageProperties dominantColors
                         */
    
                        /**
                         * Constructs a new ImageProperties.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImageProperties.
                         * @implements IImageProperties
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImageProperties=} [properties] Properties to set
                         */
                        function ImageProperties(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageProperties dominantColors.
                         * @member {google.cloud.vision.v1p3beta1.IDominantColorsAnnotation|null|undefined} dominantColors
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @instance
                         */
                        ImageProperties.prototype.dominantColors = null;
    
                        /**
                         * Creates a new ImageProperties instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageProperties=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImageProperties} ImageProperties instance
                         */
                        ImageProperties.create = function create(properties) {
                            return new ImageProperties(properties);
                        };
    
                        /**
                         * Encodes the specified ImageProperties message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageProperties.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dominantColors != null && Object.hasOwnProperty.call(message, "dominantColors"))
                                $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.encode(message.dominantColors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageProperties message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageProperties.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImageProperties();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dominantColors = $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageProperties message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageProperties.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors")) {
                                var error = $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.verify(message.dominantColors);
                                if (error)
                                    return "dominantColors." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageProperties message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImageProperties} ImageProperties
                         */
                        ImageProperties.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImageProperties)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImageProperties();
                            if (object.dominantColors != null) {
                                if (typeof object.dominantColors !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageProperties.dominantColors: object expected");
                                message.dominantColors = $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.fromObject(object.dominantColors);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageProperties message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImageProperties} message ImageProperties
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageProperties.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.dominantColors = null;
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors"))
                                object.dominantColors = $root.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.toObject(message.dominantColors, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageProperties to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageProperties.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageProperties
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImageProperties
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImageProperties";
                        };
    
                        return ImageProperties;
                    })();
    
                    v1p3beta1.CropHint = (function() {
    
                        /**
                         * Properties of a CropHint.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICropHint
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] CropHint boundingPoly
                         * @property {number|null} [confidence] CropHint confidence
                         * @property {number|null} [importanceFraction] CropHint importanceFraction
                         */
    
                        /**
                         * Constructs a new CropHint.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CropHint.
                         * @implements ICropHint
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICropHint=} [properties] Properties to set
                         */
                        function CropHint(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHint boundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.boundingPoly = null;
    
                        /**
                         * CropHint confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.confidence = 0;
    
                        /**
                         * CropHint importanceFraction.
                         * @member {number} importanceFraction
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.importanceFraction = 0;
    
                        /**
                         * Creates a new CropHint instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHint=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CropHint} CropHint instance
                         */
                        CropHint.create = function create(properties) {
                            return new CropHint(properties);
                        };
    
                        /**
                         * Encodes the specified CropHint message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHint.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            if (message.importanceFraction != null && Object.hasOwnProperty.call(message, "importanceFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.importanceFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHint message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHint.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CropHint();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.importanceFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHint message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHint.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                if (typeof message.importanceFraction !== "number")
                                    return "importanceFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a CropHint message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CropHint} CropHint
                         */
                        CropHint.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CropHint)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CropHint();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CropHint.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.importanceFraction != null)
                                message.importanceFraction = Number(object.importanceFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHint message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CropHint} message CropHint
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHint.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.confidence = 0;
                                object.importanceFraction = 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                object.importanceFraction = options.json && !isFinite(message.importanceFraction) ? String(message.importanceFraction) : message.importanceFraction;
                            return object;
                        };
    
                        /**
                         * Converts this CropHint to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHint.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHint
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CropHint
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CropHint";
                        };
    
                        return CropHint;
                    })();
    
                    v1p3beta1.CropHintsAnnotation = (function() {
    
                        /**
                         * Properties of a CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICropHintsAnnotation
                         * @property {Array.<google.cloud.vision.v1p3beta1.ICropHint>|null} [cropHints] CropHintsAnnotation cropHints
                         */
    
                        /**
                         * Constructs a new CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CropHintsAnnotation.
                         * @implements ICropHintsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsAnnotation=} [properties] Properties to set
                         */
                        function CropHintsAnnotation(properties) {
                            this.cropHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsAnnotation cropHints.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ICropHint>} cropHints
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @instance
                         */
                        CropHintsAnnotation.prototype.cropHints = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsAnnotation} CropHintsAnnotation instance
                         */
                        CropHintsAnnotation.create = function create(properties) {
                            return new CropHintsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.cropHints != null && message.cropHints.length)
                                for (var i = 0; i < message.cropHints.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.CropHint.encode(message.cropHints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.cropHints && message.cropHints.length))
                                            message.cropHints = [];
                                        message.cropHints.push($root.google.cloud.vision.v1p3beta1.CropHint.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.cropHints != null && message.hasOwnProperty("cropHints")) {
                                if (!Array.isArray(message.cropHints))
                                    return "cropHints: array expected";
                                for (var i = 0; i < message.cropHints.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.CropHint.verify(message.cropHints[i]);
                                    if (error)
                                        return "cropHints." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsAnnotation} CropHintsAnnotation
                         */
                        CropHintsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation();
                            if (object.cropHints) {
                                if (!Array.isArray(object.cropHints))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CropHintsAnnotation.cropHints: array expected");
                                message.cropHints = [];
                                for (var i = 0; i < object.cropHints.length; ++i) {
                                    if (typeof object.cropHints[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.CropHintsAnnotation.cropHints: object expected");
                                    message.cropHints[i] = $root.google.cloud.vision.v1p3beta1.CropHint.fromObject(object.cropHints[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CropHintsAnnotation} message CropHintsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.cropHints = [];
                            if (message.cropHints && message.cropHints.length) {
                                object.cropHints = [];
                                for (var j = 0; j < message.cropHints.length; ++j)
                                    object.cropHints[j] = $root.google.cloud.vision.v1p3beta1.CropHint.toObject(message.cropHints[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CropHintsAnnotation";
                        };
    
                        return CropHintsAnnotation;
                    })();
    
                    v1p3beta1.CropHintsParams = (function() {
    
                        /**
                         * Properties of a CropHintsParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICropHintsParams
                         * @property {Array.<number>|null} [aspectRatios] CropHintsParams aspectRatios
                         */
    
                        /**
                         * Constructs a new CropHintsParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CropHintsParams.
                         * @implements ICropHintsParams
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsParams=} [properties] Properties to set
                         */
                        function CropHintsParams(properties) {
                            this.aspectRatios = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsParams aspectRatios.
                         * @member {Array.<number>} aspectRatios
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @instance
                         */
                        CropHintsParams.prototype.aspectRatios = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsParams} CropHintsParams instance
                         */
                        CropHintsParams.create = function create(properties) {
                            return new CropHintsParams(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHintsParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.aspectRatios != null && message.aspectRatios.length) {
                                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    writer.float(message.aspectRatios[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CropHintsParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CropHintsParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.aspectRatios && message.aspectRatios.length))
                                            message.aspectRatios = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.aspectRatios.push(reader.float());
                                        } else
                                            message.aspectRatios.push(reader.float());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.aspectRatios != null && message.hasOwnProperty("aspectRatios")) {
                                if (!Array.isArray(message.aspectRatios))
                                    return "aspectRatios: array expected";
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    if (typeof message.aspectRatios[i] !== "number")
                                        return "aspectRatios: number[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CropHintsParams} CropHintsParams
                         */
                        CropHintsParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CropHintsParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CropHintsParams();
                            if (object.aspectRatios) {
                                if (!Array.isArray(object.aspectRatios))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CropHintsParams.aspectRatios: array expected");
                                message.aspectRatios = [];
                                for (var i = 0; i < object.aspectRatios.length; ++i)
                                    message.aspectRatios[i] = Number(object.aspectRatios[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CropHintsParams} message CropHintsParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.aspectRatios = [];
                            if (message.aspectRatios && message.aspectRatios.length) {
                                object.aspectRatios = [];
                                for (var j = 0; j < message.aspectRatios.length; ++j)
                                    object.aspectRatios[j] = options.json && !isFinite(message.aspectRatios[j]) ? String(message.aspectRatios[j]) : message.aspectRatios[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CropHintsParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CropHintsParams";
                        };
    
                        return CropHintsParams;
                    })();
    
                    v1p3beta1.WebDetectionParams = (function() {
    
                        /**
                         * Properties of a WebDetectionParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IWebDetectionParams
                         * @property {boolean|null} [includeGeoResults] WebDetectionParams includeGeoResults
                         */
    
                        /**
                         * Constructs a new WebDetectionParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a WebDetectionParams.
                         * @implements IWebDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IWebDetectionParams=} [properties] Properties to set
                         */
                        function WebDetectionParams(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetectionParams includeGeoResults.
                         * @member {boolean} includeGeoResults
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @instance
                         */
                        WebDetectionParams.prototype.includeGeoResults = false;
    
                        /**
                         * Creates a new WebDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.WebDetectionParams} WebDetectionParams instance
                         */
                        WebDetectionParams.create = function create(properties) {
                            return new WebDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.includeGeoResults != null && Object.hasOwnProperty.call(message, "includeGeoResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeGeoResults);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.includeGeoResults = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                if (typeof message.includeGeoResults !== "boolean")
                                    return "includeGeoResults: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a WebDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.WebDetectionParams} WebDetectionParams
                         */
                        WebDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.WebDetectionParams();
                            if (object.includeGeoResults != null)
                                message.includeGeoResults = Boolean(object.includeGeoResults);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.WebDetectionParams} message WebDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.includeGeoResults = false;
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                object.includeGeoResults = message.includeGeoResults;
                            return object;
                        };
    
                        /**
                         * Converts this WebDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.WebDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetectionParams";
                        };
    
                        return WebDetectionParams;
                    })();
    
                    v1p3beta1.TextDetectionParams = (function() {
    
                        /**
                         * Properties of a TextDetectionParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ITextDetectionParams
                         * @property {boolean|null} [enableTextDetectionConfidenceScore] TextDetectionParams enableTextDetectionConfidenceScore
                         * @property {Array.<string>|null} [advancedOcrOptions] TextDetectionParams advancedOcrOptions
                         */
    
                        /**
                         * Constructs a new TextDetectionParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a TextDetectionParams.
                         * @implements ITextDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ITextDetectionParams=} [properties] Properties to set
                         */
                        function TextDetectionParams(properties) {
                            this.advancedOcrOptions = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextDetectionParams enableTextDetectionConfidenceScore.
                         * @member {boolean} enableTextDetectionConfidenceScore
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.enableTextDetectionConfidenceScore = false;
    
                        /**
                         * TextDetectionParams advancedOcrOptions.
                         * @member {Array.<string>} advancedOcrOptions
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.advancedOcrOptions = $util.emptyArray;
    
                        /**
                         * Creates a new TextDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.TextDetectionParams} TextDetectionParams instance
                         */
                        TextDetectionParams.create = function create(properties) {
                            return new TextDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.enableTextDetectionConfidenceScore != null && Object.hasOwnProperty.call(message, "enableTextDetectionConfidenceScore"))
                                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enableTextDetectionConfidenceScore);
                            if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.advancedOcrOptions[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.TextDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.enableTextDetectionConfidenceScore = reader.bool();
                                        break;
                                    }
                                case 11: {
                                        if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
                                            message.advancedOcrOptions = [];
                                        message.advancedOcrOptions.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                if (typeof message.enableTextDetectionConfidenceScore !== "boolean")
                                    return "enableTextDetectionConfidenceScore: boolean expected";
                            if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
                                if (!Array.isArray(message.advancedOcrOptions))
                                    return "advancedOcrOptions: array expected";
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    if (!$util.isString(message.advancedOcrOptions[i]))
                                        return "advancedOcrOptions: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a TextDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.TextDetectionParams} TextDetectionParams
                         */
                        TextDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.TextDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.TextDetectionParams();
                            if (object.enableTextDetectionConfidenceScore != null)
                                message.enableTextDetectionConfidenceScore = Boolean(object.enableTextDetectionConfidenceScore);
                            if (object.advancedOcrOptions) {
                                if (!Array.isArray(object.advancedOcrOptions))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.TextDetectionParams.advancedOcrOptions: array expected");
                                message.advancedOcrOptions = [];
                                for (var i = 0; i < object.advancedOcrOptions.length; ++i)
                                    message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.TextDetectionParams} message TextDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.advancedOcrOptions = [];
                            if (options.defaults)
                                object.enableTextDetectionConfidenceScore = false;
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                object.enableTextDetectionConfidenceScore = message.enableTextDetectionConfidenceScore;
                            if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
                                object.advancedOcrOptions = [];
                                for (var j = 0; j < message.advancedOcrOptions.length; ++j)
                                    object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this TextDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.TextDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.TextDetectionParams";
                        };
    
                        return TextDetectionParams;
                    })();
    
                    v1p3beta1.ImageContext = (function() {
    
                        /**
                         * Properties of an ImageContext.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImageContext
                         * @property {google.cloud.vision.v1p3beta1.ILatLongRect|null} [latLongRect] ImageContext latLongRect
                         * @property {Array.<string>|null} [languageHints] ImageContext languageHints
                         * @property {google.cloud.vision.v1p3beta1.ICropHintsParams|null} [cropHintsParams] ImageContext cropHintsParams
                         * @property {google.cloud.vision.v1p3beta1.IProductSearchParams|null} [productSearchParams] ImageContext productSearchParams
                         * @property {google.cloud.vision.v1p3beta1.IWebDetectionParams|null} [webDetectionParams] ImageContext webDetectionParams
                         * @property {google.cloud.vision.v1p3beta1.ITextDetectionParams|null} [textDetectionParams] ImageContext textDetectionParams
                         */
    
                        /**
                         * Constructs a new ImageContext.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImageContext.
                         * @implements IImageContext
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImageContext=} [properties] Properties to set
                         */
                        function ImageContext(properties) {
                            this.languageHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageContext latLongRect.
                         * @member {google.cloud.vision.v1p3beta1.ILatLongRect|null|undefined} latLongRect
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.latLongRect = null;
    
                        /**
                         * ImageContext languageHints.
                         * @member {Array.<string>} languageHints
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.languageHints = $util.emptyArray;
    
                        /**
                         * ImageContext cropHintsParams.
                         * @member {google.cloud.vision.v1p3beta1.ICropHintsParams|null|undefined} cropHintsParams
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.cropHintsParams = null;
    
                        /**
                         * ImageContext productSearchParams.
                         * @member {google.cloud.vision.v1p3beta1.IProductSearchParams|null|undefined} productSearchParams
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.productSearchParams = null;
    
                        /**
                         * ImageContext webDetectionParams.
                         * @member {google.cloud.vision.v1p3beta1.IWebDetectionParams|null|undefined} webDetectionParams
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.webDetectionParams = null;
    
                        /**
                         * ImageContext textDetectionParams.
                         * @member {google.cloud.vision.v1p3beta1.ITextDetectionParams|null|undefined} textDetectionParams
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.textDetectionParams = null;
    
                        /**
                         * Creates a new ImageContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImageContext} ImageContext instance
                         */
                        ImageContext.create = function create(properties) {
                            return new ImageContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageContext message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLongRect != null && Object.hasOwnProperty.call(message, "latLongRect"))
                                $root.google.cloud.vision.v1p3beta1.LatLongRect.encode(message.latLongRect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.languageHints != null && message.languageHints.length)
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageHints[i]);
                            if (message.cropHintsParams != null && Object.hasOwnProperty.call(message, "cropHintsParams"))
                                $root.google.cloud.vision.v1p3beta1.CropHintsParams.encode(message.cropHintsParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.productSearchParams != null && Object.hasOwnProperty.call(message, "productSearchParams"))
                                $root.google.cloud.vision.v1p3beta1.ProductSearchParams.encode(message.productSearchParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.webDetectionParams != null && Object.hasOwnProperty.call(message, "webDetectionParams"))
                                $root.google.cloud.vision.v1p3beta1.WebDetectionParams.encode(message.webDetectionParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.textDetectionParams != null && Object.hasOwnProperty.call(message, "textDetectionParams"))
                                $root.google.cloud.vision.v1p3beta1.TextDetectionParams.encode(message.textDetectionParams, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImageContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLongRect = $root.google.cloud.vision.v1p3beta1.LatLongRect.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.languageHints && message.languageHints.length))
                                            message.languageHints = [];
                                        message.languageHints.push(reader.string());
                                        break;
                                    }
                                case 4: {
                                        message.cropHintsParams = $root.google.cloud.vision.v1p3beta1.CropHintsParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        message.productSearchParams = $root.google.cloud.vision.v1p3beta1.ProductSearchParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.webDetectionParams = $root.google.cloud.vision.v1p3beta1.WebDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 12: {
                                        message.textDetectionParams = $root.google.cloud.vision.v1p3beta1.TextDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect")) {
                                var error = $root.google.cloud.vision.v1p3beta1.LatLongRect.verify(message.latLongRect);
                                if (error)
                                    return "latLongRect." + error;
                            }
                            if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
                                if (!Array.isArray(message.languageHints))
                                    return "languageHints: array expected";
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    if (!$util.isString(message.languageHints[i]))
                                        return "languageHints: string[] expected";
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams")) {
                                var error = $root.google.cloud.vision.v1p3beta1.CropHintsParams.verify(message.cropHintsParams);
                                if (error)
                                    return "cropHintsParams." + error;
                            }
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ProductSearchParams.verify(message.productSearchParams);
                                if (error)
                                    return "productSearchParams." + error;
                            }
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p3beta1.WebDetectionParams.verify(message.webDetectionParams);
                                if (error)
                                    return "webDetectionParams." + error;
                            }
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextDetectionParams.verify(message.textDetectionParams);
                                if (error)
                                    return "textDetectionParams." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImageContext} ImageContext
                         */
                        ImageContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImageContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImageContext();
                            if (object.latLongRect != null) {
                                if (typeof object.latLongRect !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.latLongRect: object expected");
                                message.latLongRect = $root.google.cloud.vision.v1p3beta1.LatLongRect.fromObject(object.latLongRect);
                            }
                            if (object.languageHints) {
                                if (!Array.isArray(object.languageHints))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.languageHints: array expected");
                                message.languageHints = [];
                                for (var i = 0; i < object.languageHints.length; ++i)
                                    message.languageHints[i] = String(object.languageHints[i]);
                            }
                            if (object.cropHintsParams != null) {
                                if (typeof object.cropHintsParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.cropHintsParams: object expected");
                                message.cropHintsParams = $root.google.cloud.vision.v1p3beta1.CropHintsParams.fromObject(object.cropHintsParams);
                            }
                            if (object.productSearchParams != null) {
                                if (typeof object.productSearchParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.productSearchParams: object expected");
                                message.productSearchParams = $root.google.cloud.vision.v1p3beta1.ProductSearchParams.fromObject(object.productSearchParams);
                            }
                            if (object.webDetectionParams != null) {
                                if (typeof object.webDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.webDetectionParams: object expected");
                                message.webDetectionParams = $root.google.cloud.vision.v1p3beta1.WebDetectionParams.fromObject(object.webDetectionParams);
                            }
                            if (object.textDetectionParams != null) {
                                if (typeof object.textDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImageContext.textDetectionParams: object expected");
                                message.textDetectionParams = $root.google.cloud.vision.v1p3beta1.TextDetectionParams.fromObject(object.textDetectionParams);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImageContext} message ImageContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.languageHints = [];
                            if (options.defaults) {
                                object.latLongRect = null;
                                object.cropHintsParams = null;
                                object.productSearchParams = null;
                                object.webDetectionParams = null;
                                object.textDetectionParams = null;
                            }
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect"))
                                object.latLongRect = $root.google.cloud.vision.v1p3beta1.LatLongRect.toObject(message.latLongRect, options);
                            if (message.languageHints && message.languageHints.length) {
                                object.languageHints = [];
                                for (var j = 0; j < message.languageHints.length; ++j)
                                    object.languageHints[j] = message.languageHints[j];
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams"))
                                object.cropHintsParams = $root.google.cloud.vision.v1p3beta1.CropHintsParams.toObject(message.cropHintsParams, options);
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams"))
                                object.productSearchParams = $root.google.cloud.vision.v1p3beta1.ProductSearchParams.toObject(message.productSearchParams, options);
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams"))
                                object.webDetectionParams = $root.google.cloud.vision.v1p3beta1.WebDetectionParams.toObject(message.webDetectionParams, options);
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams"))
                                object.textDetectionParams = $root.google.cloud.vision.v1p3beta1.TextDetectionParams.toObject(message.textDetectionParams, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImageContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImageContext";
                        };
    
                        return ImageContext;
                    })();
    
                    v1p3beta1.AnnotateImageRequest = (function() {
    
                        /**
                         * Properties of an AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAnnotateImageRequest
                         * @property {google.cloud.vision.v1p3beta1.IImage|null} [image] AnnotateImageRequest image
                         * @property {Array.<google.cloud.vision.v1p3beta1.IFeature>|null} [features] AnnotateImageRequest features
                         * @property {google.cloud.vision.v1p3beta1.IImageContext|null} [imageContext] AnnotateImageRequest imageContext
                         */
    
                        /**
                         * Constructs a new AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AnnotateImageRequest.
                         * @implements IAnnotateImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageRequest=} [properties] Properties to set
                         */
                        function AnnotateImageRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageRequest image.
                         * @member {google.cloud.vision.v1p3beta1.IImage|null|undefined} image
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.image = null;
    
                        /**
                         * AnnotateImageRequest features.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateImageRequest imageContext.
                         * @member {google.cloud.vision.v1p3beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.imageContext = null;
    
                        /**
                         * Creates a new AnnotateImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageRequest} AnnotateImageRequest instance
                         */
                        AnnotateImageRequest.create = function create(properties) {
                            return new AnnotateImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                $root.google.cloud.vision.v1p3beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p3beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.image = $root.google.cloud.vision.v1p3beta1.Image.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p3beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.image != null && message.hasOwnProperty("image")) {
                                var error = $root.google.cloud.vision.v1p3beta1.Image.verify(message.image);
                                if (error)
                                    return "image." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageRequest} AnnotateImageRequest
                         */
                        AnnotateImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest();
                            if (object.image != null) {
                                if (typeof object.image !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageRequest.image: object expected");
                                message.image = $root.google.cloud.vision.v1p3beta1.Image.fromObject(object.image);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p3beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.fromObject(object.imageContext);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AnnotateImageRequest} message AnnotateImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.image = null;
                                object.imageContext = null;
                            }
                            if (message.image != null && message.hasOwnProperty("image"))
                                object.image = $root.google.cloud.vision.v1p3beta1.Image.toObject(message.image, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p3beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.toObject(message.imageContext, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AnnotateImageRequest";
                        };
    
                        return AnnotateImageRequest;
                    })();
    
                    v1p3beta1.ImageAnnotationContext = (function() {
    
                        /**
                         * Properties of an ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImageAnnotationContext
                         * @property {string|null} [uri] ImageAnnotationContext uri
                         * @property {number|null} [pageNumber] ImageAnnotationContext pageNumber
                         */
    
                        /**
                         * Constructs a new ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImageAnnotationContext.
                         * @implements IImageAnnotationContext
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImageAnnotationContext=} [properties] Properties to set
                         */
                        function ImageAnnotationContext(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageAnnotationContext uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.uri = "";
    
                        /**
                         * ImageAnnotationContext pageNumber.
                         * @member {number} pageNumber
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.pageNumber = 0;
    
                        /**
                         * Creates a new ImageAnnotationContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageAnnotationContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImageAnnotationContext} ImageAnnotationContext instance
                         */
                        ImageAnnotationContext.create = function create(properties) {
                            return new ImageAnnotationContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageNumber = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageAnnotationContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageAnnotationContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                if (!$util.isInteger(message.pageNumber))
                                    return "pageNumber: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageAnnotationContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImageAnnotationContext} ImageAnnotationContext
                         */
                        ImageAnnotationContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.pageNumber != null)
                                message.pageNumber = object.pageNumber | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageAnnotationContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImageAnnotationContext} message ImageAnnotationContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageAnnotationContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.uri = "";
                                object.pageNumber = 0;
                            }
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                object.pageNumber = message.pageNumber;
                            return object;
                        };
    
                        /**
                         * Converts this ImageAnnotationContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageAnnotationContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageAnnotationContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImageAnnotationContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageAnnotationContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImageAnnotationContext";
                        };
    
                        return ImageAnnotationContext;
                    })();
    
                    v1p3beta1.AnnotateImageResponse = (function() {
    
                        /**
                         * Properties of an AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAnnotateImageResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IFaceAnnotation>|null} [faceAnnotations] AnnotateImageResponse faceAnnotations
                         * @property {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>|null} [landmarkAnnotations] AnnotateImageResponse landmarkAnnotations
                         * @property {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>|null} [logoAnnotations] AnnotateImageResponse logoAnnotations
                         * @property {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>|null} [labelAnnotations] AnnotateImageResponse labelAnnotations
                         * @property {Array.<google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation>|null} [localizedObjectAnnotations] AnnotateImageResponse localizedObjectAnnotations
                         * @property {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>|null} [textAnnotations] AnnotateImageResponse textAnnotations
                         * @property {google.cloud.vision.v1p3beta1.ITextAnnotation|null} [fullTextAnnotation] AnnotateImageResponse fullTextAnnotation
                         * @property {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation|null} [safeSearchAnnotation] AnnotateImageResponse safeSearchAnnotation
                         * @property {google.cloud.vision.v1p3beta1.IImageProperties|null} [imagePropertiesAnnotation] AnnotateImageResponse imagePropertiesAnnotation
                         * @property {google.cloud.vision.v1p3beta1.ICropHintsAnnotation|null} [cropHintsAnnotation] AnnotateImageResponse cropHintsAnnotation
                         * @property {google.cloud.vision.v1p3beta1.IWebDetection|null} [webDetection] AnnotateImageResponse webDetection
                         * @property {google.cloud.vision.v1p3beta1.IProductSearchResults|null} [productSearchResults] AnnotateImageResponse productSearchResults
                         * @property {google.rpc.IStatus|null} [error] AnnotateImageResponse error
                         * @property {google.cloud.vision.v1p3beta1.IImageAnnotationContext|null} [context] AnnotateImageResponse context
                         */
    
                        /**
                         * Constructs a new AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AnnotateImageResponse.
                         * @implements IAnnotateImageResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageResponse=} [properties] Properties to set
                         */
                        function AnnotateImageResponse(properties) {
                            this.faceAnnotations = [];
                            this.landmarkAnnotations = [];
                            this.logoAnnotations = [];
                            this.labelAnnotations = [];
                            this.localizedObjectAnnotations = [];
                            this.textAnnotations = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageResponse faceAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IFaceAnnotation>} faceAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.faceAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse landmarkAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>} landmarkAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.landmarkAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse logoAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>} logoAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.logoAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse labelAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>} labelAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.labelAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse localizedObjectAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ILocalizedObjectAnnotation>} localizedObjectAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.localizedObjectAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse textAnnotations.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IEntityAnnotation>} textAnnotations
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.textAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse fullTextAnnotation.
                         * @member {google.cloud.vision.v1p3beta1.ITextAnnotation|null|undefined} fullTextAnnotation
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.fullTextAnnotation = null;
    
                        /**
                         * AnnotateImageResponse safeSearchAnnotation.
                         * @member {google.cloud.vision.v1p3beta1.ISafeSearchAnnotation|null|undefined} safeSearchAnnotation
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.safeSearchAnnotation = null;
    
                        /**
                         * AnnotateImageResponse imagePropertiesAnnotation.
                         * @member {google.cloud.vision.v1p3beta1.IImageProperties|null|undefined} imagePropertiesAnnotation
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.imagePropertiesAnnotation = null;
    
                        /**
                         * AnnotateImageResponse cropHintsAnnotation.
                         * @member {google.cloud.vision.v1p3beta1.ICropHintsAnnotation|null|undefined} cropHintsAnnotation
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.cropHintsAnnotation = null;
    
                        /**
                         * AnnotateImageResponse webDetection.
                         * @member {google.cloud.vision.v1p3beta1.IWebDetection|null|undefined} webDetection
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.webDetection = null;
    
                        /**
                         * AnnotateImageResponse productSearchResults.
                         * @member {google.cloud.vision.v1p3beta1.IProductSearchResults|null|undefined} productSearchResults
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.productSearchResults = null;
    
                        /**
                         * AnnotateImageResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.error = null;
    
                        /**
                         * AnnotateImageResponse context.
                         * @member {google.cloud.vision.v1p3beta1.IImageAnnotationContext|null|undefined} context
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.context = null;
    
                        /**
                         * Creates a new AnnotateImageResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageResponse} AnnotateImageResponse instance
                         */
                        AnnotateImageResponse.create = function create(properties) {
                            return new AnnotateImageResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.faceAnnotations != null && message.faceAnnotations.length)
                                for (var i = 0; i < message.faceAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.FaceAnnotation.encode(message.faceAnnotations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.landmarkAnnotations != null && message.landmarkAnnotations.length)
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.EntityAnnotation.encode(message.landmarkAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.logoAnnotations != null && message.logoAnnotations.length)
                                for (var i = 0; i < message.logoAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.EntityAnnotation.encode(message.logoAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.labelAnnotations != null && message.labelAnnotations.length)
                                for (var i = 0; i < message.labelAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.EntityAnnotation.encode(message.labelAnnotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.textAnnotations != null && message.textAnnotations.length)
                                for (var i = 0; i < message.textAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.EntityAnnotation.encode(message.textAnnotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.safeSearchAnnotation != null && Object.hasOwnProperty.call(message, "safeSearchAnnotation"))
                                $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.encode(message.safeSearchAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.imagePropertiesAnnotation != null && Object.hasOwnProperty.call(message, "imagePropertiesAnnotation"))
                                $root.google.cloud.vision.v1p3beta1.ImageProperties.encode(message.imagePropertiesAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            if (message.cropHintsAnnotation != null && Object.hasOwnProperty.call(message, "cropHintsAnnotation"))
                                $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation.encode(message.cropHintsAnnotation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                            if (message.fullTextAnnotation != null && Object.hasOwnProperty.call(message, "fullTextAnnotation"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.encode(message.fullTextAnnotation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            if (message.webDetection != null && Object.hasOwnProperty.call(message, "webDetection"))
                                $root.google.cloud.vision.v1p3beta1.WebDetection.encode(message.webDetection, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                            if (message.productSearchResults != null && Object.hasOwnProperty.call(message, "productSearchResults"))
                                $root.google.cloud.vision.v1p3beta1.ProductSearchResults.encode(message.productSearchResults, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
                            if (message.context != null && Object.hasOwnProperty.call(message, "context"))
                                $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext.encode(message.context, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                            if (message.localizedObjectAnnotations != null && message.localizedObjectAnnotations.length)
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.encode(message.localizedObjectAnnotations[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.faceAnnotations && message.faceAnnotations.length))
                                            message.faceAnnotations = [];
                                        message.faceAnnotations.push($root.google.cloud.vision.v1p3beta1.FaceAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.landmarkAnnotations && message.landmarkAnnotations.length))
                                            message.landmarkAnnotations = [];
                                        message.landmarkAnnotations.push($root.google.cloud.vision.v1p3beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.logoAnnotations && message.logoAnnotations.length))
                                            message.logoAnnotations = [];
                                        message.logoAnnotations.push($root.google.cloud.vision.v1p3beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.labelAnnotations && message.labelAnnotations.length))
                                            message.labelAnnotations = [];
                                        message.labelAnnotations.push($root.google.cloud.vision.v1p3beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 22: {
                                        if (!(message.localizedObjectAnnotations && message.localizedObjectAnnotations.length))
                                            message.localizedObjectAnnotations = [];
                                        message.localizedObjectAnnotations.push($root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        if (!(message.textAnnotations && message.textAnnotations.length))
                                            message.textAnnotations = [];
                                        message.textAnnotations.push($root.google.cloud.vision.v1p3beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 12: {
                                        message.fullTextAnnotation = $root.google.cloud.vision.v1p3beta1.TextAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.safeSearchAnnotation = $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p3beta1.ImageProperties.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 11: {
                                        message.cropHintsAnnotation = $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 13: {
                                        message.webDetection = $root.google.cloud.vision.v1p3beta1.WebDetection.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 14: {
                                        message.productSearchResults = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 9: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 21: {
                                        message.context = $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.faceAnnotations != null && message.hasOwnProperty("faceAnnotations")) {
                                if (!Array.isArray(message.faceAnnotations))
                                    return "faceAnnotations: array expected";
                                for (var i = 0; i < message.faceAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.verify(message.faceAnnotations[i]);
                                    if (error)
                                        return "faceAnnotations." + error;
                                }
                            }
                            if (message.landmarkAnnotations != null && message.hasOwnProperty("landmarkAnnotations")) {
                                if (!Array.isArray(message.landmarkAnnotations))
                                    return "landmarkAnnotations: array expected";
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.verify(message.landmarkAnnotations[i]);
                                    if (error)
                                        return "landmarkAnnotations." + error;
                                }
                            }
                            if (message.logoAnnotations != null && message.hasOwnProperty("logoAnnotations")) {
                                if (!Array.isArray(message.logoAnnotations))
                                    return "logoAnnotations: array expected";
                                for (var i = 0; i < message.logoAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.verify(message.logoAnnotations[i]);
                                    if (error)
                                        return "logoAnnotations." + error;
                                }
                            }
                            if (message.labelAnnotations != null && message.hasOwnProperty("labelAnnotations")) {
                                if (!Array.isArray(message.labelAnnotations))
                                    return "labelAnnotations: array expected";
                                for (var i = 0; i < message.labelAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.verify(message.labelAnnotations[i]);
                                    if (error)
                                        return "labelAnnotations." + error;
                                }
                            }
                            if (message.localizedObjectAnnotations != null && message.hasOwnProperty("localizedObjectAnnotations")) {
                                if (!Array.isArray(message.localizedObjectAnnotations))
                                    return "localizedObjectAnnotations: array expected";
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.verify(message.localizedObjectAnnotations[i]);
                                    if (error)
                                        return "localizedObjectAnnotations." + error;
                                }
                            }
                            if (message.textAnnotations != null && message.hasOwnProperty("textAnnotations")) {
                                if (!Array.isArray(message.textAnnotations))
                                    return "textAnnotations: array expected";
                                for (var i = 0; i < message.textAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.verify(message.textAnnotations[i]);
                                    if (error)
                                        return "textAnnotations." + error;
                                }
                            }
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.verify(message.fullTextAnnotation);
                                if (error)
                                    return "fullTextAnnotation." + error;
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation")) {
                                var error = $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.verify(message.safeSearchAnnotation);
                                if (error)
                                    return "safeSearchAnnotation." + error;
                            }
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImageProperties.verify(message.imagePropertiesAnnotation);
                                if (error)
                                    return "imagePropertiesAnnotation." + error;
                            }
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation")) {
                                var error = $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation.verify(message.cropHintsAnnotation);
                                if (error)
                                    return "cropHintsAnnotation." + error;
                            }
                            if (message.webDetection != null && message.hasOwnProperty("webDetection")) {
                                var error = $root.google.cloud.vision.v1p3beta1.WebDetection.verify(message.webDetection);
                                if (error)
                                    return "webDetection." + error;
                            }
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.verify(message.productSearchResults);
                                if (error)
                                    return "productSearchResults." + error;
                            }
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            if (message.context != null && message.hasOwnProperty("context")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext.verify(message.context);
                                if (error)
                                    return "context." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateImageResponse} AnnotateImageResponse
                         */
                        AnnotateImageResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse();
                            if (object.faceAnnotations) {
                                if (!Array.isArray(object.faceAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.faceAnnotations: array expected");
                                message.faceAnnotations = [];
                                for (var i = 0; i < object.faceAnnotations.length; ++i) {
                                    if (typeof object.faceAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.faceAnnotations: object expected");
                                    message.faceAnnotations[i] = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.fromObject(object.faceAnnotations[i]);
                                }
                            }
                            if (object.landmarkAnnotations) {
                                if (!Array.isArray(object.landmarkAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.landmarkAnnotations: array expected");
                                message.landmarkAnnotations = [];
                                for (var i = 0; i < object.landmarkAnnotations.length; ++i) {
                                    if (typeof object.landmarkAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.landmarkAnnotations: object expected");
                                    message.landmarkAnnotations[i] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.fromObject(object.landmarkAnnotations[i]);
                                }
                            }
                            if (object.logoAnnotations) {
                                if (!Array.isArray(object.logoAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.logoAnnotations: array expected");
                                message.logoAnnotations = [];
                                for (var i = 0; i < object.logoAnnotations.length; ++i) {
                                    if (typeof object.logoAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.logoAnnotations: object expected");
                                    message.logoAnnotations[i] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.fromObject(object.logoAnnotations[i]);
                                }
                            }
                            if (object.labelAnnotations) {
                                if (!Array.isArray(object.labelAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.labelAnnotations: array expected");
                                message.labelAnnotations = [];
                                for (var i = 0; i < object.labelAnnotations.length; ++i) {
                                    if (typeof object.labelAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.labelAnnotations: object expected");
                                    message.labelAnnotations[i] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.fromObject(object.labelAnnotations[i]);
                                }
                            }
                            if (object.localizedObjectAnnotations) {
                                if (!Array.isArray(object.localizedObjectAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.localizedObjectAnnotations: array expected");
                                message.localizedObjectAnnotations = [];
                                for (var i = 0; i < object.localizedObjectAnnotations.length; ++i) {
                                    if (typeof object.localizedObjectAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.localizedObjectAnnotations: object expected");
                                    message.localizedObjectAnnotations[i] = $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.fromObject(object.localizedObjectAnnotations[i]);
                                }
                            }
                            if (object.textAnnotations) {
                                if (!Array.isArray(object.textAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.textAnnotations: array expected");
                                message.textAnnotations = [];
                                for (var i = 0; i < object.textAnnotations.length; ++i) {
                                    if (typeof object.textAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.textAnnotations: object expected");
                                    message.textAnnotations[i] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.fromObject(object.textAnnotations[i]);
                                }
                            }
                            if (object.fullTextAnnotation != null) {
                                if (typeof object.fullTextAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.fullTextAnnotation: object expected");
                                message.fullTextAnnotation = $root.google.cloud.vision.v1p3beta1.TextAnnotation.fromObject(object.fullTextAnnotation);
                            }
                            if (object.safeSearchAnnotation != null) {
                                if (typeof object.safeSearchAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.safeSearchAnnotation: object expected");
                                message.safeSearchAnnotation = $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.fromObject(object.safeSearchAnnotation);
                            }
                            if (object.imagePropertiesAnnotation != null) {
                                if (typeof object.imagePropertiesAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.imagePropertiesAnnotation: object expected");
                                message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p3beta1.ImageProperties.fromObject(object.imagePropertiesAnnotation);
                            }
                            if (object.cropHintsAnnotation != null) {
                                if (typeof object.cropHintsAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.cropHintsAnnotation: object expected");
                                message.cropHintsAnnotation = $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation.fromObject(object.cropHintsAnnotation);
                            }
                            if (object.webDetection != null) {
                                if (typeof object.webDetection !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.webDetection: object expected");
                                message.webDetection = $root.google.cloud.vision.v1p3beta1.WebDetection.fromObject(object.webDetection);
                            }
                            if (object.productSearchResults != null) {
                                if (typeof object.productSearchResults !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.productSearchResults: object expected");
                                message.productSearchResults = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.fromObject(object.productSearchResults);
                            }
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            if (object.context != null) {
                                if (typeof object.context !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateImageResponse.context: object expected");
                                message.context = $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext.fromObject(object.context);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AnnotateImageResponse} message AnnotateImageResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.faceAnnotations = [];
                                object.landmarkAnnotations = [];
                                object.logoAnnotations = [];
                                object.labelAnnotations = [];
                                object.textAnnotations = [];
                                object.localizedObjectAnnotations = [];
                            }
                            if (options.defaults) {
                                object.safeSearchAnnotation = null;
                                object.imagePropertiesAnnotation = null;
                                object.error = null;
                                object.cropHintsAnnotation = null;
                                object.fullTextAnnotation = null;
                                object.webDetection = null;
                                object.productSearchResults = null;
                                object.context = null;
                            }
                            if (message.faceAnnotations && message.faceAnnotations.length) {
                                object.faceAnnotations = [];
                                for (var j = 0; j < message.faceAnnotations.length; ++j)
                                    object.faceAnnotations[j] = $root.google.cloud.vision.v1p3beta1.FaceAnnotation.toObject(message.faceAnnotations[j], options);
                            }
                            if (message.landmarkAnnotations && message.landmarkAnnotations.length) {
                                object.landmarkAnnotations = [];
                                for (var j = 0; j < message.landmarkAnnotations.length; ++j)
                                    object.landmarkAnnotations[j] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.toObject(message.landmarkAnnotations[j], options);
                            }
                            if (message.logoAnnotations && message.logoAnnotations.length) {
                                object.logoAnnotations = [];
                                for (var j = 0; j < message.logoAnnotations.length; ++j)
                                    object.logoAnnotations[j] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.toObject(message.logoAnnotations[j], options);
                            }
                            if (message.labelAnnotations && message.labelAnnotations.length) {
                                object.labelAnnotations = [];
                                for (var j = 0; j < message.labelAnnotations.length; ++j)
                                    object.labelAnnotations[j] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.toObject(message.labelAnnotations[j], options);
                            }
                            if (message.textAnnotations && message.textAnnotations.length) {
                                object.textAnnotations = [];
                                for (var j = 0; j < message.textAnnotations.length; ++j)
                                    object.textAnnotations[j] = $root.google.cloud.vision.v1p3beta1.EntityAnnotation.toObject(message.textAnnotations[j], options);
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation"))
                                object.safeSearchAnnotation = $root.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.toObject(message.safeSearchAnnotation, options);
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation"))
                                object.imagePropertiesAnnotation = $root.google.cloud.vision.v1p3beta1.ImageProperties.toObject(message.imagePropertiesAnnotation, options);
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation"))
                                object.cropHintsAnnotation = $root.google.cloud.vision.v1p3beta1.CropHintsAnnotation.toObject(message.cropHintsAnnotation, options);
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation"))
                                object.fullTextAnnotation = $root.google.cloud.vision.v1p3beta1.TextAnnotation.toObject(message.fullTextAnnotation, options);
                            if (message.webDetection != null && message.hasOwnProperty("webDetection"))
                                object.webDetection = $root.google.cloud.vision.v1p3beta1.WebDetection.toObject(message.webDetection, options);
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults"))
                                object.productSearchResults = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.toObject(message.productSearchResults, options);
                            if (message.context != null && message.hasOwnProperty("context"))
                                object.context = $root.google.cloud.vision.v1p3beta1.ImageAnnotationContext.toObject(message.context, options);
                            if (message.localizedObjectAnnotations && message.localizedObjectAnnotations.length) {
                                object.localizedObjectAnnotations = [];
                                for (var j = 0; j < message.localizedObjectAnnotations.length; ++j)
                                    object.localizedObjectAnnotations[j] = $root.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.toObject(message.localizedObjectAnnotations[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateImageResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AnnotateImageResponse";
                        };
    
                        return AnnotateImageResponse;
                    })();
    
                    v1p3beta1.AnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAnnotateFileResponse
                         * @property {google.cloud.vision.v1p3beta1.IInputConfig|null} [inputConfig] AnnotateFileResponse inputConfig
                         * @property {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageResponse>|null} [responses] AnnotateFileResponse responses
                         */
    
                        /**
                         * Constructs a new AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AnnotateFileResponse.
                         * @implements IAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AnnotateFileResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileResponse inputConfig.
                         * @member {google.cloud.vision.v1p3beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileResponse responses.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateFileResponse} AnnotateFileResponse instance
                         */
                        AnnotateFileResponse.create = function create(properties) {
                            return new AnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p3beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p3beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AnnotateFileResponse} AnnotateFileResponse
                         */
                        AnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AnnotateFileResponse();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateFileResponse.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateFileResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AnnotateFileResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AnnotateFileResponse} message AnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (options.defaults)
                                object.inputConfig = null;
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AnnotateFileResponse";
                        };
    
                        return AnnotateFileResponse;
                    })();
    
                    v1p3beta1.BatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageRequest>|null} [requests] BatchAnnotateImagesRequest requests
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a BatchAnnotateImagesRequest.
                         * @implements IBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest instance
                         */
                        BatchAnnotateImagesRequest.create = function create(properties) {
                            return new BatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p3beta1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         */
                        BatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest} message BatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p3beta1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest";
                        };
    
                        return BatchAnnotateImagesRequest;
                    })();
    
                    v1p3beta1.BatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IBatchAnnotateImagesResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageResponse>|null} [responses] BatchAnnotateImagesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a BatchAnnotateImagesResponse.
                         * @implements IBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @instance
                         */
                        BatchAnnotateImagesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse instance
                         */
                        BatchAnnotateImagesResponse.create = function create(properties) {
                            return new BatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         */
                        BatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse} message BatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p3beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse";
                        };
    
                        return BatchAnnotateImagesResponse;
                    })();
    
                    v1p3beta1.AsyncAnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAsyncAnnotateFileRequest
                         * @property {google.cloud.vision.v1p3beta1.IInputConfig|null} [inputConfig] AsyncAnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1p3beta1.IFeature>|null} [features] AsyncAnnotateFileRequest features
                         * @property {google.cloud.vision.v1p3beta1.IImageContext|null} [imageContext] AsyncAnnotateFileRequest imageContext
                         * @property {google.cloud.vision.v1p3beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileRequest outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AsyncAnnotateFileRequest.
                         * @implements IAsyncAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1p3beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AsyncAnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AsyncAnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1p3beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AsyncAnnotateFileRequest outputConfig.
                         * @member {google.cloud.vision.v1p3beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest instance
                         */
                        AsyncAnnotateFileRequest.create = function create(properties) {
                            return new AsyncAnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p3beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p3beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p3beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p3beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p3beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p3beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         */
                        AsyncAnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p3beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest} message AsyncAnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                                object.outputConfig = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p3beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p3beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p3beta1.ImageContext.toObject(message.imageContext, options);
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest";
                        };
    
                        return AsyncAnnotateFileRequest;
                    })();
    
                    v1p3beta1.AsyncAnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAsyncAnnotateFileResponse
                         * @property {google.cloud.vision.v1p3beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AsyncAnnotateFileResponse.
                         * @implements IAsyncAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileResponse outputConfig.
                         * @member {google.cloud.vision.v1p3beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @instance
                         */
                        AsyncAnnotateFileResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse instance
                         */
                        AsyncAnnotateFileResponse.create = function create(properties) {
                            return new AsyncAnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p3beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p3beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         */
                        AsyncAnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse} message AsyncAnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p3beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse";
                        };
    
                        return AsyncAnnotateFileResponse;
                    })();
    
                    v1p3beta1.AsyncBatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAsyncBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest>|null} [requests] AsyncBatchAnnotateFilesRequest requests
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesRequest.
                         * @implements IAsyncBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IAsyncAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest instance
                         */
                        AsyncBatchAnnotateFilesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         */
                        AsyncBatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest";
                        };
    
                        return AsyncBatchAnnotateFilesRequest;
                    })();
    
                    v1p3beta1.AsyncBatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAsyncBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse>|null} [responses] AsyncBatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesResponse.
                         * @implements IAsyncBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IAsyncAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse instance
                         */
                        AsyncBatchAnnotateFilesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         */
                        AsyncBatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse";
                        };
    
                        return AsyncBatchAnnotateFilesResponse;
                    })();
    
                    v1p3beta1.InputConfig = (function() {
    
                        /**
                         * Properties of an InputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IInputConfig
                         * @property {google.cloud.vision.v1p3beta1.IGcsSource|null} [gcsSource] InputConfig gcsSource
                         * @property {string|null} [mimeType] InputConfig mimeType
                         */
    
                        /**
                         * Constructs a new InputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an InputConfig.
                         * @implements IInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IInputConfig=} [properties] Properties to set
                         */
                        function InputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * InputConfig gcsSource.
                         * @member {google.cloud.vision.v1p3beta1.IGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.gcsSource = null;
    
                        /**
                         * InputConfig mimeType.
                         * @member {string} mimeType
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.mimeType = "";
    
                        /**
                         * Creates a new InputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.InputConfig} InputConfig instance
                         */
                        InputConfig.create = function create(properties) {
                            return new InputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.vision.v1p3beta1.InputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1p3beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.InputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.InputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1p3beta1.GcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.mimeType = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an InputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        InputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                var error = $root.google.cloud.vision.v1p3beta1.GcsSource.verify(message.gcsSource);
                                if (error)
                                    return "gcsSource." + error;
                            }
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                if (!$util.isString(message.mimeType))
                                    return "mimeType: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an InputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.InputConfig} InputConfig
                         */
                        InputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.InputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.InputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.InputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1p3beta1.GcsSource.fromObject(object.gcsSource);
                            }
                            if (object.mimeType != null)
                                message.mimeType = String(object.mimeType);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.InputConfig} message InputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        InputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsSource = null;
                                object.mimeType = "";
                            }
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource"))
                                object.gcsSource = $root.google.cloud.vision.v1p3beta1.GcsSource.toObject(message.gcsSource, options);
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                object.mimeType = message.mimeType;
                            return object;
                        };
    
                        /**
                         * Converts this InputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        InputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for InputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.InputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.InputConfig";
                        };
    
                        return InputConfig;
                    })();
    
                    v1p3beta1.OutputConfig = (function() {
    
                        /**
                         * Properties of an OutputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IOutputConfig
                         * @property {google.cloud.vision.v1p3beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination
                         * @property {number|null} [batchSize] OutputConfig batchSize
                         */
    
                        /**
                         * Constructs a new OutputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an OutputConfig.
                         * @implements IOutputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IOutputConfig=} [properties] Properties to set
                         */
                        function OutputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OutputConfig gcsDestination.
                         * @member {google.cloud.vision.v1p3beta1.IGcsDestination|null|undefined} gcsDestination
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.gcsDestination = null;
    
                        /**
                         * OutputConfig batchSize.
                         * @member {number} batchSize
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.batchSize = 0;
    
                        /**
                         * Creates a new OutputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOutputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.OutputConfig} OutputConfig instance
                         */
                        OutputConfig.create = function create(properties) {
                            return new OutputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.vision.v1p3beta1.OutputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination"))
                                $root.google.cloud.vision.v1p3beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.batchSize != null && Object.hasOwnProperty.call(message, "batchSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchSize);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.OutputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.OutputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsDestination = $root.google.cloud.vision.v1p3beta1.GcsDestination.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.batchSize = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OutputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OutputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
                                var error = $root.google.cloud.vision.v1p3beta1.GcsDestination.verify(message.gcsDestination);
                                if (error)
                                    return "gcsDestination." + error;
                            }
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                if (!$util.isInteger(message.batchSize))
                                    return "batchSize: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.OutputConfig} OutputConfig
                         */
                        OutputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.OutputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.OutputConfig();
                            if (object.gcsDestination != null) {
                                if (typeof object.gcsDestination !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.OutputConfig.gcsDestination: object expected");
                                message.gcsDestination = $root.google.cloud.vision.v1p3beta1.GcsDestination.fromObject(object.gcsDestination);
                            }
                            if (object.batchSize != null)
                                message.batchSize = object.batchSize | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.OutputConfig} message OutputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OutputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsDestination = null;
                                object.batchSize = 0;
                            }
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination"))
                                object.gcsDestination = $root.google.cloud.vision.v1p3beta1.GcsDestination.toObject(message.gcsDestination, options);
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                object.batchSize = message.batchSize;
                            return object;
                        };
    
                        /**
                         * Converts this OutputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OutputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OutputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.OutputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.OutputConfig";
                        };
    
                        return OutputConfig;
                    })();
    
                    v1p3beta1.GcsSource = (function() {
    
                        /**
                         * Properties of a GcsSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IGcsSource
                         * @property {string|null} [uri] GcsSource uri
                         */
    
                        /**
                         * Constructs a new GcsSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a GcsSource.
                         * @implements IGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IGcsSource=} [properties] Properties to set
                         */
                        function GcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsSource uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @instance
                         */
                        GcsSource.prototype.uri = "";
    
                        /**
                         * Creates a new GcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.GcsSource} GcsSource instance
                         */
                        GcsSource.create = function create(properties) {
                            return new GcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.vision.v1p3beta1.GcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.GcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.GcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.GcsSource} GcsSource
                         */
                        GcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.GcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.GcsSource();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.GcsSource} message GcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.GcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.GcsSource";
                        };
    
                        return GcsSource;
                    })();
    
                    v1p3beta1.GcsDestination = (function() {
    
                        /**
                         * Properties of a GcsDestination.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IGcsDestination
                         * @property {string|null} [uri] GcsDestination uri
                         */
    
                        /**
                         * Constructs a new GcsDestination.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a GcsDestination.
                         * @implements IGcsDestination
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IGcsDestination=} [properties] Properties to set
                         */
                        function GcsDestination(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsDestination uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @instance
                         */
                        GcsDestination.prototype.uri = "";
    
                        /**
                         * Creates a new GcsDestination instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsDestination=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.GcsDestination} GcsDestination instance
                         */
                        GcsDestination.create = function create(properties) {
                            return new GcsDestination(properties);
                        };
    
                        /**
                         * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.vision.v1p3beta1.GcsDestination.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.GcsDestination.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.GcsDestination();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsDestination message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsDestination.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.GcsDestination} GcsDestination
                         */
                        GcsDestination.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.GcsDestination)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.GcsDestination();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.GcsDestination} message GcsDestination
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsDestination.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsDestination to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsDestination.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsDestination
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.GcsDestination
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.GcsDestination";
                        };
    
                        return GcsDestination;
                    })();
    
                    /**
                     * Likelihood enum.
                     * @name google.cloud.vision.v1p3beta1.Likelihood
                     * @enum {number}
                     * @property {number} UNKNOWN=0 UNKNOWN value
                     * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value
                     * @property {number} UNLIKELY=2 UNLIKELY value
                     * @property {number} POSSIBLE=3 POSSIBLE value
                     * @property {number} LIKELY=4 LIKELY value
                     * @property {number} VERY_LIKELY=5 VERY_LIKELY value
                     */
                    v1p3beta1.Likelihood = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNKNOWN"] = 0;
                        values[valuesById[1] = "VERY_UNLIKELY"] = 1;
                        values[valuesById[2] = "UNLIKELY"] = 2;
                        values[valuesById[3] = "POSSIBLE"] = 3;
                        values[valuesById[4] = "LIKELY"] = 4;
                        values[valuesById[5] = "VERY_LIKELY"] = 5;
                        return values;
                    })();
    
                    v1p3beta1.OperationMetadata = (function() {
    
                        /**
                         * Properties of an OperationMetadata.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IOperationMetadata
                         * @property {google.cloud.vision.v1p3beta1.OperationMetadata.State|null} [state] OperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime
                         * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime
                         */
    
                        /**
                         * Constructs a new OperationMetadata.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an OperationMetadata.
                         * @implements IOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IOperationMetadata=} [properties] Properties to set
                         */
                        function OperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OperationMetadata state.
                         * @member {google.cloud.vision.v1p3beta1.OperationMetadata.State} state
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.state = 0;
    
                        /**
                         * OperationMetadata createTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} createTime
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.createTime = null;
    
                        /**
                         * OperationMetadata updateTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} updateTime
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.updateTime = null;
    
                        /**
                         * Creates a new OperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.OperationMetadata} OperationMetadata instance
                         */
                        OperationMetadata.create = function create(properties) {
                            return new OperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.vision.v1p3beta1.OperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
                                $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
                                $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.OperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.OperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.createTime != null && message.hasOwnProperty("createTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.createTime);
                                if (error)
                                    return "createTime." + error;
                            }
                            if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
                                if (error)
                                    return "updateTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.OperationMetadata} OperationMetadata
                         */
                        OperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.OperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.OperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "CREATED":
                            case 1:
                                message.state = 1;
                                break;
                            case "RUNNING":
                            case 2:
                                message.state = 2;
                                break;
                            case "DONE":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.createTime != null) {
                                if (typeof object.createTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.OperationMetadata.createTime: object expected");
                                message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
                            }
                            if (object.updateTime != null) {
                                if (typeof object.updateTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.OperationMetadata.updateTime: object expected");
                                message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.OperationMetadata} message OperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.createTime = null;
                                object.updateTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p3beta1.OperationMetadata.State[message.state] : message.state;
                            if (message.createTime != null && message.hasOwnProperty("createTime"))
                                object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
                            if (message.updateTime != null && message.hasOwnProperty("updateTime"))
                                object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this OperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.OperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.OperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1p3beta1.OperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} CREATED=1 CREATED value
                         * @property {number} RUNNING=2 RUNNING value
                         * @property {number} DONE=3 DONE value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        OperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "CREATED"] = 1;
                            values[valuesById[2] = "RUNNING"] = 2;
                            values[valuesById[3] = "DONE"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return OperationMetadata;
                    })();
    
                    v1p3beta1.ProductSearchParams = (function() {
    
                        /**
                         * Properties of a ProductSearchParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IProductSearchParams
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] ProductSearchParams boundingPoly
                         * @property {string|null} [productSet] ProductSearchParams productSet
                         * @property {Array.<string>|null} [productCategories] ProductSearchParams productCategories
                         * @property {string|null} [filter] ProductSearchParams filter
                         */
    
                        /**
                         * Constructs a new ProductSearchParams.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ProductSearchParams.
                         * @implements IProductSearchParams
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchParams=} [properties] Properties to set
                         */
                        function ProductSearchParams(properties) {
                            this.productCategories = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchParams boundingPoly.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.boundingPoly = null;
    
                        /**
                         * ProductSearchParams productSet.
                         * @member {string} productSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productSet = "";
    
                        /**
                         * ProductSearchParams productCategories.
                         * @member {Array.<string>} productCategories
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productCategories = $util.emptyArray;
    
                        /**
                         * ProductSearchParams filter.
                         * @member {string} filter
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.filter = "";
    
                        /**
                         * Creates a new ProductSearchParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchParams} ProductSearchParams instance
                         */
                        ProductSearchParams.create = function create(properties) {
                            return new ProductSearchParams(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.productSet);
                            if (message.productCategories != null && message.productCategories.length)
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.productCategories[i]);
                            if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
                                writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSearchParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.productSet = reader.string();
                                        break;
                                    }
                                case 7: {
                                        if (!(message.productCategories && message.productCategories.length))
                                            message.productCategories = [];
                                        message.productCategories.push(reader.string());
                                        break;
                                    }
                                case 8: {
                                        message.filter = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                if (!$util.isString(message.productSet))
                                    return "productSet: string expected";
                            if (message.productCategories != null && message.hasOwnProperty("productCategories")) {
                                if (!Array.isArray(message.productCategories))
                                    return "productCategories: array expected";
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    if (!$util.isString(message.productCategories[i]))
                                        return "productCategories: string[] expected";
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                if (!$util.isString(message.filter))
                                    return "filter: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchParams} ProductSearchParams
                         */
                        ProductSearchParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSearchParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ProductSearchParams();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchParams.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.productSet != null)
                                message.productSet = String(object.productSet);
                            if (object.productCategories) {
                                if (!Array.isArray(object.productCategories))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchParams.productCategories: array expected");
                                message.productCategories = [];
                                for (var i = 0; i < object.productCategories.length; ++i)
                                    message.productCategories[i] = String(object.productCategories[i]);
                            }
                            if (object.filter != null)
                                message.filter = String(object.filter);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ProductSearchParams} message ProductSearchParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productCategories = [];
                            if (options.defaults) {
                                object.productSet = "";
                                object.filter = "";
                                object.boundingPoly = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = message.productSet;
                            if (message.productCategories && message.productCategories.length) {
                                object.productCategories = [];
                                for (var j = 0; j < message.productCategories.length; ++j)
                                    object.productCategories[j] = message.productCategories[j];
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                object.filter = message.filter;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSearchParams";
                        };
    
                        return ProductSearchParams;
                    })();
    
                    v1p3beta1.ProductSearchResults = (function() {
    
                        /**
                         * Properties of a ProductSearchResults.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IProductSearchResults
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSearchResults indexTime
                         * @property {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IResult>|null} [results] ProductSearchResults results
                         * @property {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult>|null} [productGroupedResults] ProductSearchResults productGroupedResults
                         */
    
                        /**
                         * Constructs a new ProductSearchResults.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ProductSearchResults.
                         * @implements IProductSearchResults
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchResults=} [properties] Properties to set
                         */
                        function ProductSearchResults(properties) {
                            this.results = [];
                            this.productGroupedResults = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchResults indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.indexTime = null;
    
                        /**
                         * ProductSearchResults results.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IResult>} results
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.results = $util.emptyArray;
    
                        /**
                         * ProductSearchResults productGroupedResults.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult>} productGroupedResults
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.productGroupedResults = $util.emptyArray;
    
                        /**
                         * Creates a new ProductSearchResults instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchResults=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults} ProductSearchResults instance
                         */
                        ProductSearchResults.create = function create(properties) {
                            return new ProductSearchResults(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.results != null && message.results.length)
                                for (var i = 0; i < message.results.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.productGroupedResults != null && message.productGroupedResults.length)
                                for (var i = 0; i < message.productGroupedResults.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.encode(message.productGroupedResults[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        if (!(message.results && message.results.length))
                                            message.results = [];
                                        message.results.push($root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.productGroupedResults && message.productGroupedResults.length))
                                            message.productGroupedResults = [];
                                        message.productGroupedResults.push($root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchResults message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchResults.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.results != null && message.hasOwnProperty("results")) {
                                if (!Array.isArray(message.results))
                                    return "results: array expected";
                                for (var i = 0; i < message.results.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.verify(message.results[i]);
                                    if (error)
                                        return "results." + error;
                                }
                            }
                            if (message.productGroupedResults != null && message.hasOwnProperty("productGroupedResults")) {
                                if (!Array.isArray(message.productGroupedResults))
                                    return "productGroupedResults: array expected";
                                for (var i = 0; i < message.productGroupedResults.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.verify(message.productGroupedResults[i]);
                                    if (error)
                                        return "productGroupedResults." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchResults message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults} ProductSearchResults
                         */
                        ProductSearchResults.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSearchResults)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults();
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.results) {
                                if (!Array.isArray(object.results))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.results: array expected");
                                message.results = [];
                                for (var i = 0; i < object.results.length; ++i) {
                                    if (typeof object.results[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.results: object expected");
                                    message.results[i] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.fromObject(object.results[i]);
                                }
                            }
                            if (object.productGroupedResults) {
                                if (!Array.isArray(object.productGroupedResults))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.productGroupedResults: array expected");
                                message.productGroupedResults = [];
                                for (var i = 0; i < object.productGroupedResults.length; ++i) {
                                    if (typeof object.productGroupedResults[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.productGroupedResults: object expected");
                                    message.productGroupedResults[i] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.fromObject(object.productGroupedResults[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchResults message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ProductSearchResults} message ProductSearchResults
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchResults.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.results = [];
                                object.productGroupedResults = [];
                            }
                            if (options.defaults)
                                object.indexTime = null;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.results && message.results.length) {
                                object.results = [];
                                for (var j = 0; j < message.results.length; ++j)
                                    object.results[j] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.toObject(message.results[j], options);
                            }
                            if (message.productGroupedResults && message.productGroupedResults.length) {
                                object.productGroupedResults = [];
                                for (var j = 0; j < message.productGroupedResults.length; ++j)
                                    object.productGroupedResults[j] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.toObject(message.productGroupedResults[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchResults to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchResults.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchResults
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSearchResults";
                        };
    
                        ProductSearchResults.Result = (function() {
    
                            /**
                             * Properties of a Result.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @interface IResult
                             * @property {google.cloud.vision.v1p3beta1.IProduct|null} [product] Result product
                             * @property {number|null} [score] Result score
                             * @property {string|null} [image] Result image
                             */
    
                            /**
                             * Constructs a new Result.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @classdesc Represents a Result.
                             * @implements IResult
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IResult=} [properties] Properties to set
                             */
                            function Result(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Result product.
                             * @member {google.cloud.vision.v1p3beta1.IProduct|null|undefined} product
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.product = null;
    
                            /**
                             * Result score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.score = 0;
    
                            /**
                             * Result image.
                             * @member {string} image
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.image = "";
    
                            /**
                             * Creates a new Result instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.Result} Result instance
                             */
                            Result.create = function create(properties) {
                                return new Result(properties);
                            };
    
                            /**
                             * Encodes the specified Result message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                    $root.google.cloud.vision.v1p3beta1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.image);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.product = $root.google.cloud.vision.v1p3beta1.Product.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.image = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Result message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Result.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.product != null && message.hasOwnProperty("product")) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Product.verify(message.product);
                                    if (error)
                                        return "product." + error;
                                }
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.image != null && message.hasOwnProperty("image"))
                                    if (!$util.isString(message.image))
                                        return "image: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a Result message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.Result} Result
                             */
                            Result.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result();
                                if (object.product != null) {
                                    if (typeof object.product !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.Result.product: object expected");
                                    message.product = $root.google.cloud.vision.v1p3beta1.Product.fromObject(object.product);
                                }
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.image != null)
                                    message.image = String(object.image);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Result message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.Result} message Result
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Result.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.product = null;
                                    object.score = 0;
                                    object.image = "";
                                }
                                if (message.product != null && message.hasOwnProperty("product"))
                                    object.product = $root.google.cloud.vision.v1p3beta1.Product.toObject(message.product, options);
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.image != null && message.hasOwnProperty("image"))
                                    object.image = message.image;
                                return object;
                            };
    
                            /**
                             * Converts this Result to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Result.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Result
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.Result
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSearchResults.Result";
                            };
    
                            return Result;
                        })();
    
                        ProductSearchResults.ObjectAnnotation = (function() {
    
                            /**
                             * Properties of an ObjectAnnotation.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @interface IObjectAnnotation
                             * @property {string|null} [mid] ObjectAnnotation mid
                             * @property {string|null} [languageCode] ObjectAnnotation languageCode
                             * @property {string|null} [name] ObjectAnnotation name
                             * @property {number|null} [score] ObjectAnnotation score
                             */
    
                            /**
                             * Constructs a new ObjectAnnotation.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @classdesc Represents an ObjectAnnotation.
                             * @implements IObjectAnnotation
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             */
                            function ObjectAnnotation(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * ObjectAnnotation mid.
                             * @member {string} mid
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.mid = "";
    
                            /**
                             * ObjectAnnotation languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.languageCode = "";
    
                            /**
                             * ObjectAnnotation name.
                             * @member {string} name
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.name = "";
    
                            /**
                             * ObjectAnnotation score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.score = 0;
    
                            /**
                             * Creates a new ObjectAnnotation instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation instance
                             */
                            ObjectAnnotation.create = function create(properties) {
                                return new ObjectAnnotation(properties);
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.mid = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 3: {
                                            message.name = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies an ObjectAnnotation message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            ObjectAnnotation.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    if (!$util.isString(message.mid))
                                        return "mid: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.name != null && message.hasOwnProperty("name"))
                                    if (!$util.isString(message.name))
                                        return "name: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates an ObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             */
                            ObjectAnnotation.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation();
                                if (object.mid != null)
                                    message.mid = String(object.mid);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.name != null)
                                    message.name = String(object.name);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from an ObjectAnnotation message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation} message ObjectAnnotation
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            ObjectAnnotation.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.mid = "";
                                    object.languageCode = "";
                                    object.name = "";
                                    object.score = 0;
                                }
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    object.mid = message.mid;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.name != null && message.hasOwnProperty("name"))
                                    object.name = message.name;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this ObjectAnnotation to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            ObjectAnnotation.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for ObjectAnnotation
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            ObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation";
                            };
    
                            return ObjectAnnotation;
                        })();
    
                        ProductSearchResults.GroupedResult = (function() {
    
                            /**
                             * Properties of a GroupedResult.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @interface IGroupedResult
                             * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingPoly] GroupedResult boundingPoly
                             * @property {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IResult>|null} [results] GroupedResult results
                             * @property {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation>|null} [objectAnnotations] GroupedResult objectAnnotations
                             */
    
                            /**
                             * Constructs a new GroupedResult.
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults
                             * @classdesc Represents a GroupedResult.
                             * @implements IGroupedResult
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             */
                            function GroupedResult(properties) {
                                this.results = [];
                                this.objectAnnotations = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * GroupedResult boundingPoly.
                             * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingPoly
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.boundingPoly = null;
    
                            /**
                             * GroupedResult results.
                             * @member {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IResult>} results
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.results = $util.emptyArray;
    
                            /**
                             * GroupedResult objectAnnotations.
                             * @member {Array.<google.cloud.vision.v1p3beta1.ProductSearchResults.IObjectAnnotation>} objectAnnotations
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.objectAnnotations = $util.emptyArray;
    
                            /**
                             * Creates a new GroupedResult instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} GroupedResult instance
                             */
                            GroupedResult.create = function create(properties) {
                                return new GroupedResult(properties);
                            };
    
                            /**
                             * Encodes the specified GroupedResult message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                    $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.results != null && message.results.length)
                                    for (var i = 0; i < message.results.length; ++i)
                                        $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                if (message.objectAnnotations != null && message.objectAnnotations.length)
                                    for (var i = 0; i < message.objectAnnotations.length; ++i)
                                        $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.encode(message.objectAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified GroupedResult message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            if (!(message.results && message.results.length))
                                                message.results = [];
                                            message.results.push($root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 3: {
                                            if (!(message.objectAnnotations && message.objectAnnotations.length))
                                                message.objectAnnotations = [];
                                            message.objectAnnotations.push($root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a GroupedResult message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            GroupedResult.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                    var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPoly);
                                    if (error)
                                        return "boundingPoly." + error;
                                }
                                if (message.results != null && message.hasOwnProperty("results")) {
                                    if (!Array.isArray(message.results))
                                        return "results: array expected";
                                    for (var i = 0; i < message.results.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.verify(message.results[i]);
                                        if (error)
                                            return "results." + error;
                                    }
                                }
                                if (message.objectAnnotations != null && message.hasOwnProperty("objectAnnotations")) {
                                    if (!Array.isArray(message.objectAnnotations))
                                        return "objectAnnotations: array expected";
                                    for (var i = 0; i < message.objectAnnotations.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.verify(message.objectAnnotations[i]);
                                        if (error)
                                            return "objectAnnotations." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a GroupedResult message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} GroupedResult
                             */
                            GroupedResult.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult();
                                if (object.boundingPoly != null) {
                                    if (typeof object.boundingPoly !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.boundingPoly: object expected");
                                    message.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPoly);
                                }
                                if (object.results) {
                                    if (!Array.isArray(object.results))
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.results: array expected");
                                    message.results = [];
                                    for (var i = 0; i < object.results.length; ++i) {
                                        if (typeof object.results[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.results: object expected");
                                        message.results[i] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.fromObject(object.results[i]);
                                    }
                                }
                                if (object.objectAnnotations) {
                                    if (!Array.isArray(object.objectAnnotations))
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.objectAnnotations: array expected");
                                    message.objectAnnotations = [];
                                    for (var i = 0; i < object.objectAnnotations.length; ++i) {
                                        if (typeof object.objectAnnotations[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult.objectAnnotations: object expected");
                                        message.objectAnnotations[i] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.fromObject(object.objectAnnotations[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a GroupedResult message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult} message GroupedResult
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            GroupedResult.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.results = [];
                                    object.objectAnnotations = [];
                                }
                                if (options.defaults)
                                    object.boundingPoly = null;
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                    object.boundingPoly = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPoly, options);
                                if (message.results && message.results.length) {
                                    object.results = [];
                                    for (var j = 0; j < message.results.length; ++j)
                                        object.results[j] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.toObject(message.results[j], options);
                                }
                                if (message.objectAnnotations && message.objectAnnotations.length) {
                                    object.objectAnnotations = [];
                                    for (var j = 0; j < message.objectAnnotations.length; ++j)
                                        object.objectAnnotations[j] = $root.google.cloud.vision.v1p3beta1.ProductSearchResults.ObjectAnnotation.toObject(message.objectAnnotations[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this GroupedResult to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            GroupedResult.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for GroupedResult
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            GroupedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSearchResults.GroupedResult";
                            };
    
                            return GroupedResult;
                        })();
    
                        return ProductSearchResults;
                    })();
    
                    v1p3beta1.ProductSearch = (function() {
    
                        /**
                         * Constructs a new ProductSearch service.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ProductSearch
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ProductSearch(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ProductSearch.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ProductSearch;
    
                        /**
                         * Creates new ProductSearch service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ProductSearch} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ProductSearch.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|createProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef CreateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.CreateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProductSet = function createProductSet(request, callback) {
                            return this.rpcCall(createProductSet, $root.google.cloud.vision.v1p3beta1.CreateProductSetRequest, $root.google.cloud.vision.v1p3beta1.ProductSet, request, callback);
                        }, "name", { value: "CreateProductSet" });
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|listProductSets}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef ListProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ListProductSetsResponse} [response] ListProductSetsResponse
                         */
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.ListProductSetsCallback} callback Node-style callback called with the error, if any, and ListProductSetsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductSets = function listProductSets(request, callback) {
                            return this.rpcCall(listProductSets, $root.google.cloud.vision.v1p3beta1.ListProductSetsRequest, $root.google.cloud.vision.v1p3beta1.ListProductSetsResponse, request, callback);
                        }, "name", { value: "ListProductSets" });
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ListProductSetsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|getProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef GetProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.GetProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProductSet = function getProductSet(request, callback) {
                            return this.rpcCall(getProductSet, $root.google.cloud.vision.v1p3beta1.GetProductSetRequest, $root.google.cloud.vision.v1p3beta1.ProductSet, request, callback);
                        }, "name", { value: "GetProductSet" });
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|updateProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef UpdateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.UpdateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProductSet = function updateProductSet(request, callback) {
                            return this.rpcCall(updateProductSet, $root.google.cloud.vision.v1p3beta1.UpdateProductSetRequest, $root.google.cloud.vision.v1p3beta1.ProductSet, request, callback);
                        }, "name", { value: "UpdateProductSet" });
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|deleteProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef DeleteProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.DeleteProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProductSet = function deleteProductSet(request, callback) {
                            return this.rpcCall(deleteProductSet, $root.google.cloud.vision.v1p3beta1.DeleteProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProductSet" });
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|createProduct}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef CreateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.CreateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProduct = function createProduct(request, callback) {
                            return this.rpcCall(createProduct, $root.google.cloud.vision.v1p3beta1.CreateProductRequest, $root.google.cloud.vision.v1p3beta1.Product, request, callback);
                        }, "name", { value: "CreateProduct" });
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|listProducts}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef ListProductsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ListProductsResponse} [response] ListProductsResponse
                         */
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.ListProductsCallback} callback Node-style callback called with the error, if any, and ListProductsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProducts = function listProducts(request, callback) {
                            return this.rpcCall(listProducts, $root.google.cloud.vision.v1p3beta1.ListProductsRequest, $root.google.cloud.vision.v1p3beta1.ListProductsResponse, request, callback);
                        }, "name", { value: "ListProducts" });
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ListProductsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|getProduct}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef GetProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest} request GetProductRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.GetProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProduct = function getProduct(request, callback) {
                            return this.rpcCall(getProduct, $root.google.cloud.vision.v1p3beta1.GetProductRequest, $root.google.cloud.vision.v1p3beta1.Product, request, callback);
                        }, "name", { value: "GetProduct" });
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest} request GetProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|updateProduct}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef UpdateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.UpdateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProduct = function updateProduct(request, callback) {
                            return this.rpcCall(updateProduct, $root.google.cloud.vision.v1p3beta1.UpdateProductRequest, $root.google.cloud.vision.v1p3beta1.Product, request, callback);
                        }, "name", { value: "UpdateProduct" });
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|deleteProduct}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef DeleteProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.DeleteProductCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProduct = function deleteProduct(request, callback) {
                            return this.rpcCall(deleteProduct, $root.google.cloud.vision.v1p3beta1.DeleteProductRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProduct" });
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|createReferenceImage}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef CreateReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.CreateReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createReferenceImage = function createReferenceImage(request, callback) {
                            return this.rpcCall(createReferenceImage, $root.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest, $root.google.cloud.vision.v1p3beta1.ReferenceImage, request, callback);
                        }, "name", { value: "CreateReferenceImage" });
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|deleteReferenceImage}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef DeleteReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.DeleteReferenceImageCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteReferenceImage = function deleteReferenceImage(request, callback) {
                            return this.rpcCall(deleteReferenceImage, $root.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteReferenceImage" });
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|listReferenceImages}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef ListReferenceImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} [response] ListReferenceImagesResponse
                         */
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.ListReferenceImagesCallback} callback Node-style callback called with the error, if any, and ListReferenceImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listReferenceImages = function listReferenceImages(request, callback) {
                            return this.rpcCall(listReferenceImages, $root.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest, $root.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse, request, callback);
                        }, "name", { value: "ListReferenceImages" });
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ListReferenceImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|getReferenceImage}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef GetReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.GetReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getReferenceImage = function getReferenceImage(request, callback) {
                            return this.rpcCall(getReferenceImage, $root.google.cloud.vision.v1p3beta1.GetReferenceImageRequest, $root.google.cloud.vision.v1p3beta1.ReferenceImage, request, callback);
                        }, "name", { value: "GetReferenceImage" });
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|addProductToProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef AddProductToProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.AddProductToProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.addProductToProductSet = function addProductToProductSet(request, callback) {
                            return this.rpcCall(addProductToProductSet, $root.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "AddProductToProductSet" });
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|removeProductFromProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef RemoveProductFromProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.RemoveProductFromProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.removeProductFromProductSet = function removeProductFromProductSet(request, callback) {
                            return this.rpcCall(removeProductFromProductSet, $root.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "RemoveProductFromProductSet" });
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|listProductsInProductSet}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef ListProductsInProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} [response] ListProductsInProductSetResponse
                         */
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.ListProductsInProductSetCallback} callback Node-style callback called with the error, if any, and ListProductsInProductSetResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductsInProductSet = function listProductsInProductSet(request, callback) {
                            return this.rpcCall(listProductsInProductSet, $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest, $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse, request, callback);
                        }, "name", { value: "ListProductsInProductSet" });
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p3beta1.ProductSearch|importProductSets}.
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @typedef ImportProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1p3beta1.ProductSearch.ImportProductSetsCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.importProductSets = function importProductSets(request, callback) {
                            return this.rpcCall(importProductSets, $root.google.cloud.vision.v1p3beta1.ImportProductSetsRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "ImportProductSets" });
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1p3beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ProductSearch;
                    })();
    
                    v1p3beta1.Product = (function() {
    
                        /**
                         * Properties of a Product.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IProduct
                         * @property {string|null} [name] Product name
                         * @property {string|null} [displayName] Product displayName
                         * @property {string|null} [description] Product description
                         * @property {string|null} [productCategory] Product productCategory
                         * @property {Array.<google.cloud.vision.v1p3beta1.Product.IKeyValue>|null} [productLabels] Product productLabels
                         */
    
                        /**
                         * Constructs a new Product.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Product.
                         * @implements IProduct
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IProduct=} [properties] Properties to set
                         */
                        function Product(properties) {
                            this.productLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Product name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         */
                        Product.prototype.name = "";
    
                        /**
                         * Product displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         */
                        Product.prototype.displayName = "";
    
                        /**
                         * Product description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         */
                        Product.prototype.description = "";
    
                        /**
                         * Product productCategory.
                         * @member {string} productCategory
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         */
                        Product.prototype.productCategory = "";
    
                        /**
                         * Product productLabels.
                         * @member {Array.<google.cloud.vision.v1p3beta1.Product.IKeyValue>} productLabels
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         */
                        Product.prototype.productLabels = $util.emptyArray;
    
                        /**
                         * Creates a new Product instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProduct=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Product} Product instance
                         */
                        Product.create = function create(properties) {
                            return new Product(properties);
                        };
    
                        /**
                         * Encodes the specified Product message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Product.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.productCategory != null && Object.hasOwnProperty.call(message, "productCategory"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.productCategory);
                            if (message.productLabels != null && message.productLabels.length)
                                for (var i = 0; i < message.productLabels.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Product.KeyValue.encode(message.productLabels[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Product message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Product.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Product();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.productCategory = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (!(message.productLabels && message.productLabels.length))
                                            message.productLabels = [];
                                        message.productLabels.push($root.google.cloud.vision.v1p3beta1.Product.KeyValue.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Product message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Product.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                if (!$util.isString(message.productCategory))
                                    return "productCategory: string expected";
                            if (message.productLabels != null && message.hasOwnProperty("productLabels")) {
                                if (!Array.isArray(message.productLabels))
                                    return "productLabels: array expected";
                                for (var i = 0; i < message.productLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Product.KeyValue.verify(message.productLabels[i]);
                                    if (error)
                                        return "productLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a Product message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Product} Product
                         */
                        Product.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Product)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Product();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.productCategory != null)
                                message.productCategory = String(object.productCategory);
                            if (object.productLabels) {
                                if (!Array.isArray(object.productLabels))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Product.productLabels: array expected");
                                message.productLabels = [];
                                for (var i = 0; i < object.productLabels.length; ++i) {
                                    if (typeof object.productLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.Product.productLabels: object expected");
                                    message.productLabels[i] = $root.google.cloud.vision.v1p3beta1.Product.KeyValue.fromObject(object.productLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Product message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Product} message Product
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Product.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productLabels = [];
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.description = "";
                                object.productCategory = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                object.productCategory = message.productCategory;
                            if (message.productLabels && message.productLabels.length) {
                                object.productLabels = [];
                                for (var j = 0; j < message.productLabels.length; ++j)
                                    object.productLabels[j] = $root.google.cloud.vision.v1p3beta1.Product.KeyValue.toObject(message.productLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this Product to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Product.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Product
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Product
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Product";
                        };
    
                        Product.KeyValue = (function() {
    
                            /**
                             * Properties of a KeyValue.
                             * @memberof google.cloud.vision.v1p3beta1.Product
                             * @interface IKeyValue
                             * @property {string|null} [key] KeyValue key
                             * @property {string|null} [value] KeyValue value
                             */
    
                            /**
                             * Constructs a new KeyValue.
                             * @memberof google.cloud.vision.v1p3beta1.Product
                             * @classdesc Represents a KeyValue.
                             * @implements IKeyValue
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.Product.IKeyValue=} [properties] Properties to set
                             */
                            function KeyValue(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * KeyValue key.
                             * @member {string} key
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.key = "";
    
                            /**
                             * KeyValue value.
                             * @member {string} value
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.value = "";
    
                            /**
                             * Creates a new KeyValue instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.Product.IKeyValue=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.Product.KeyValue} KeyValue instance
                             */
                            KeyValue.create = function create(properties) {
                                return new KeyValue(properties);
                            };
    
                            /**
                             * Encodes the specified KeyValue message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Product.KeyValue.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
                                if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Product.KeyValue.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Product.KeyValue();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.key = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.value = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a KeyValue message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            KeyValue.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.key != null && message.hasOwnProperty("key"))
                                    if (!$util.isString(message.key))
                                        return "key: string expected";
                                if (message.value != null && message.hasOwnProperty("value"))
                                    if (!$util.isString(message.value))
                                        return "value: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a KeyValue message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.Product.KeyValue} KeyValue
                             */
                            KeyValue.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.Product.KeyValue)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.Product.KeyValue();
                                if (object.key != null)
                                    message.key = String(object.key);
                                if (object.value != null)
                                    message.value = String(object.value);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a KeyValue message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.Product.KeyValue} message KeyValue
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            KeyValue.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.key = "";
                                    object.value = "";
                                }
                                if (message.key != null && message.hasOwnProperty("key"))
                                    object.key = message.key;
                                if (message.value != null && message.hasOwnProperty("value"))
                                    object.value = message.value;
                                return object;
                            };
    
                            /**
                             * Converts this KeyValue to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            KeyValue.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for KeyValue
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.Product.KeyValue
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Product.KeyValue";
                            };
    
                            return KeyValue;
                        })();
    
                        return Product;
                    })();
    
                    v1p3beta1.ProductSet = (function() {
    
                        /**
                         * Properties of a ProductSet.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IProductSet
                         * @property {string|null} [name] ProductSet name
                         * @property {string|null} [displayName] ProductSet displayName
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSet indexTime
                         * @property {google.rpc.IStatus|null} [indexError] ProductSet indexError
                         */
    
                        /**
                         * Constructs a new ProductSet.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ProductSet.
                         * @implements IProductSet
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IProductSet=} [properties] Properties to set
                         */
                        function ProductSet(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSet name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.name = "";
    
                        /**
                         * ProductSet displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.displayName = "";
    
                        /**
                         * ProductSet indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexTime = null;
    
                        /**
                         * ProductSet indexError.
                         * @member {google.rpc.IStatus|null|undefined} indexError
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexError = null;
    
                        /**
                         * Creates a new ProductSet instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSet=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ProductSet} ProductSet instance
                         */
                        ProductSet.create = function create(properties) {
                            return new ProductSet(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSet message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSet.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.indexError != null && Object.hasOwnProperty.call(message, "indexError"))
                                $root.google.rpc.Status.encode(message.indexError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSet message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ProductSet.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ProductSet();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.indexError = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSet message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSet.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.indexError != null && message.hasOwnProperty("indexError")) {
                                var error = $root.google.rpc.Status.verify(message.indexError);
                                if (error)
                                    return "indexError." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSet message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ProductSet} ProductSet
                         */
                        ProductSet.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ProductSet)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ProductSet();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSet.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.indexError != null) {
                                if (typeof object.indexError !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ProductSet.indexError: object expected");
                                message.indexError = $root.google.rpc.Status.fromObject(object.indexError);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSet message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ProductSet} message ProductSet
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSet.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.indexTime = null;
                                object.indexError = null;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.indexError != null && message.hasOwnProperty("indexError"))
                                object.indexError = $root.google.rpc.Status.toObject(message.indexError, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSet to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSet.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSet
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ProductSet
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ProductSet";
                        };
    
                        return ProductSet;
                    })();
    
                    v1p3beta1.ReferenceImage = (function() {
    
                        /**
                         * Properties of a ReferenceImage.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IReferenceImage
                         * @property {string|null} [name] ReferenceImage name
                         * @property {string|null} [uri] ReferenceImage uri
                         * @property {Array.<google.cloud.vision.v1p3beta1.IBoundingPoly>|null} [boundingPolys] ReferenceImage boundingPolys
                         */
    
                        /**
                         * Constructs a new ReferenceImage.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ReferenceImage.
                         * @implements IReferenceImage
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IReferenceImage=} [properties] Properties to set
                         */
                        function ReferenceImage(properties) {
                            this.boundingPolys = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ReferenceImage name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.name = "";
    
                        /**
                         * ReferenceImage uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.uri = "";
    
                        /**
                         * ReferenceImage boundingPolys.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IBoundingPoly>} boundingPolys
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.boundingPolys = $util.emptyArray;
    
                        /**
                         * Creates a new ReferenceImage instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IReferenceImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ReferenceImage} ReferenceImage instance
                         */
                        ReferenceImage.create = function create(properties) {
                            return new ReferenceImage(properties);
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ReferenceImage.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri);
                            if (message.boundingPolys != null && message.boundingPolys.length)
                                for (var i = 0; i < message.boundingPolys.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingPolys[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ReferenceImage.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ReferenceImage();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 3: {
                                        if (!(message.boundingPolys && message.boundingPolys.length))
                                            message.boundingPolys = [];
                                        message.boundingPolys.push($root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ReferenceImage message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ReferenceImage.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.boundingPolys != null && message.hasOwnProperty("boundingPolys")) {
                                if (!Array.isArray(message.boundingPolys))
                                    return "boundingPolys: array expected";
                                for (var i = 0; i < message.boundingPolys.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingPolys[i]);
                                    if (error)
                                        return "boundingPolys." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ReferenceImage message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ReferenceImage} ReferenceImage
                         */
                        ReferenceImage.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ReferenceImage)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ReferenceImage();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.boundingPolys) {
                                if (!Array.isArray(object.boundingPolys))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ReferenceImage.boundingPolys: array expected");
                                message.boundingPolys = [];
                                for (var i = 0; i < object.boundingPolys.length; ++i) {
                                    if (typeof object.boundingPolys[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ReferenceImage.boundingPolys: object expected");
                                    message.boundingPolys[i] = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingPolys[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ReferenceImage message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ReferenceImage} message ReferenceImage
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ReferenceImage.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.boundingPolys = [];
                            if (options.defaults) {
                                object.name = "";
                                object.uri = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.boundingPolys && message.boundingPolys.length) {
                                object.boundingPolys = [];
                                for (var j = 0; j < message.boundingPolys.length; ++j)
                                    object.boundingPolys[j] = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingPolys[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ReferenceImage to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ReferenceImage.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ReferenceImage
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ReferenceImage
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ReferenceImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ReferenceImage";
                        };
    
                        return ReferenceImage;
                    })();
    
                    v1p3beta1.CreateProductRequest = (function() {
    
                        /**
                         * Properties of a CreateProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICreateProductRequest
                         * @property {string|null} [parent] CreateProductRequest parent
                         * @property {google.cloud.vision.v1p3beta1.IProduct|null} [product] CreateProductRequest product
                         * @property {string|null} [productId] CreateProductRequest productId
                         */
    
                        /**
                         * Constructs a new CreateProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CreateProductRequest.
                         * @implements ICreateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest=} [properties] Properties to set
                         */
                        function CreateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.parent = "";
    
                        /**
                         * CreateProductRequest product.
                         * @member {google.cloud.vision.v1p3beta1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.product = null;
    
                        /**
                         * CreateProductRequest productId.
                         * @member {string} productId
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.productId = "";
    
                        /**
                         * Creates a new CreateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductRequest} CreateProductRequest instance
                         */
                        CreateProductRequest.create = function create(properties) {
                            return new CreateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1p3beta1.Product.encode(message.product, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CreateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = $root.google.cloud.vision.v1p3beta1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1p3beta1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                if (!$util.isString(message.productId))
                                    return "productId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductRequest} CreateProductRequest
                         */
                        CreateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CreateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CreateProductRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CreateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1p3beta1.Product.fromObject(object.product);
                            }
                            if (object.productId != null)
                                message.productId = String(object.productId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CreateProductRequest} message CreateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.product = null;
                                object.productId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1p3beta1.Product.toObject(message.product, options);
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                object.productId = message.productId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CreateProductRequest";
                        };
    
                        return CreateProductRequest;
                    })();
    
                    v1p3beta1.ListProductsRequest = (function() {
    
                        /**
                         * Properties of a ListProductsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductsRequest
                         * @property {string|null} [parent] ListProductsRequest parent
                         * @property {number|null} [pageSize] ListProductsRequest pageSize
                         * @property {string|null} [pageToken] ListProductsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductsRequest.
                         * @implements IListProductsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest=} [properties] Properties to set
                         */
                        function ListProductsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.parent = "";
    
                        /**
                         * ListProductsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsRequest} ListProductsRequest instance
                         */
                        ListProductsRequest.create = function create(properties) {
                            return new ListProductsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsRequest} ListProductsRequest
                         */
                        ListProductsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductsRequest} message ListProductsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductsRequest";
                        };
    
                        return ListProductsRequest;
                    })();
    
                    v1p3beta1.ListProductsResponse = (function() {
    
                        /**
                         * Properties of a ListProductsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductsResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IProduct>|null} [products] ListProductsResponse products
                         * @property {string|null} [nextPageToken] ListProductsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductsResponse.
                         * @implements IListProductsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductsResponse=} [properties] Properties to set
                         */
                        function ListProductsResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsResponse products.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IProduct>} products
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsResponse} ListProductsResponse instance
                         */
                        ListProductsResponse.create = function create(properties) {
                            return new ListProductsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1p3beta1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsResponse} ListProductsResponse
                         */
                        ListProductsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductsResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ListProductsResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ListProductsResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1p3beta1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductsResponse} message ListProductsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1p3beta1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductsResponse";
                        };
    
                        return ListProductsResponse;
                    })();
    
                    v1p3beta1.GetProductRequest = (function() {
    
                        /**
                         * Properties of a GetProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IGetProductRequest
                         * @property {string|null} [name] GetProductRequest name
                         */
    
                        /**
                         * Constructs a new GetProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a GetProductRequest.
                         * @implements IGetProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest=} [properties] Properties to set
                         */
                        function GetProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @instance
                         */
                        GetProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.GetProductRequest} GetProductRequest instance
                         */
                        GetProductRequest.create = function create(properties) {
                            return new GetProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.GetProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.GetProductRequest} GetProductRequest
                         */
                        GetProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.GetProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.GetProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.GetProductRequest} message GetProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.GetProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.GetProductRequest";
                        };
    
                        return GetProductRequest;
                    })();
    
                    v1p3beta1.UpdateProductRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IUpdateProductRequest
                         * @property {google.cloud.vision.v1p3beta1.IProduct|null} [product] UpdateProductRequest product
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an UpdateProductRequest.
                         * @implements IUpdateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest=} [properties] Properties to set
                         */
                        function UpdateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductRequest product.
                         * @member {google.cloud.vision.v1p3beta1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.product = null;
    
                        /**
                         * UpdateProductRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductRequest} UpdateProductRequest instance
                         */
                        UpdateProductRequest.create = function create(properties) {
                            return new UpdateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.UpdateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1p3beta1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.UpdateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.UpdateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.product = $root.google.cloud.vision.v1p3beta1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1p3beta1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductRequest} UpdateProductRequest
                         */
                        UpdateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.UpdateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.UpdateProductRequest();
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.UpdateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1p3beta1.Product.fromObject(object.product);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.UpdateProductRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.UpdateProductRequest} message UpdateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.product = null;
                                object.updateMask = null;
                            }
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1p3beta1.Product.toObject(message.product, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.UpdateProductRequest";
                        };
    
                        return UpdateProductRequest;
                    })();
    
                    v1p3beta1.DeleteProductRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IDeleteProductRequest
                         * @property {string|null} [name] DeleteProductRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a DeleteProductRequest.
                         * @implements IDeleteProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest=} [properties] Properties to set
                         */
                        function DeleteProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @instance
                         */
                        DeleteProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductRequest} DeleteProductRequest instance
                         */
                        DeleteProductRequest.create = function create(properties) {
                            return new DeleteProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.DeleteProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductRequest} DeleteProductRequest
                         */
                        DeleteProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.DeleteProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.DeleteProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.DeleteProductRequest} message DeleteProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.DeleteProductRequest";
                        };
    
                        return DeleteProductRequest;
                    })();
    
                    v1p3beta1.CreateProductSetRequest = (function() {
    
                        /**
                         * Properties of a CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICreateProductSetRequest
                         * @property {string|null} [parent] CreateProductSetRequest parent
                         * @property {google.cloud.vision.v1p3beta1.IProductSet|null} [productSet] CreateProductSetRequest productSet
                         * @property {string|null} [productSetId] CreateProductSetRequest productSetId
                         */
    
                        /**
                         * Constructs a new CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CreateProductSetRequest.
                         * @implements ICreateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest=} [properties] Properties to set
                         */
                        function CreateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductSetRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.parent = "";
    
                        /**
                         * CreateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1p3beta1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * CreateProductSetRequest productSetId.
                         * @member {string} productSetId
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSetId = "";
    
                        /**
                         * Creates a new CreateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductSetRequest} CreateProductSetRequest instance
                         */
                        CreateProductSetRequest.create = function create(properties) {
                            return new CreateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1p3beta1.ProductSet.encode(message.productSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productSetId != null && Object.hasOwnProperty.call(message, "productSetId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productSetId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CreateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productSetId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                if (!$util.isString(message.productSetId))
                                    return "productSetId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CreateProductSetRequest} CreateProductSetRequest
                         */
                        CreateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CreateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CreateProductSetRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CreateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.productSetId != null)
                                message.productSetId = String(object.productSetId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CreateProductSetRequest} message CreateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.productSet = null;
                                object.productSetId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.toObject(message.productSet, options);
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                object.productSetId = message.productSetId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CreateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CreateProductSetRequest";
                        };
    
                        return CreateProductSetRequest;
                    })();
    
                    v1p3beta1.ListProductSetsRequest = (function() {
    
                        /**
                         * Properties of a ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductSetsRequest
                         * @property {string|null} [parent] ListProductSetsRequest parent
                         * @property {number|null} [pageSize] ListProductSetsRequest pageSize
                         * @property {string|null} [pageToken] ListProductSetsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductSetsRequest.
                         * @implements IListProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest=} [properties] Properties to set
                         */
                        function ListProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ListProductSetsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductSetsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsRequest} ListProductSetsRequest instance
                         */
                        ListProductSetsRequest.create = function create(properties) {
                            return new ListProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsRequest} ListProductSetsRequest
                         */
                        ListProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductSetsRequest} message ListProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductSetsRequest";
                        };
    
                        return ListProductSetsRequest;
                    })();
    
                    v1p3beta1.ListProductSetsResponse = (function() {
    
                        /**
                         * Properties of a ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IProductSet>|null} [productSets] ListProductSetsResponse productSets
                         * @property {string|null} [nextPageToken] ListProductSetsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductSetsResponse.
                         * @implements IListProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsResponse=} [properties] Properties to set
                         */
                        function ListProductSetsResponse(properties) {
                            this.productSets = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsResponse productSets.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IProductSet>} productSets
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.productSets = $util.emptyArray;
    
                        /**
                         * ListProductSetsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsResponse} ListProductSetsResponse instance
                         */
                        ListProductSetsResponse.create = function create(properties) {
                            return new ListProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSets != null && message.productSets.length)
                                for (var i = 0; i < message.productSets.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ProductSet.encode(message.productSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.productSets && message.productSets.length))
                                            message.productSets = [];
                                        message.productSets.push($root.google.cloud.vision.v1p3beta1.ProductSet.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSets != null && message.hasOwnProperty("productSets")) {
                                if (!Array.isArray(message.productSets))
                                    return "productSets: array expected";
                                for (var i = 0; i < message.productSets.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ProductSet.verify(message.productSets[i]);
                                    if (error)
                                        return "productSets." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductSetsResponse} ListProductSetsResponse
                         */
                        ListProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductSetsResponse();
                            if (object.productSets) {
                                if (!Array.isArray(object.productSets))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ListProductSetsResponse.productSets: array expected");
                                message.productSets = [];
                                for (var i = 0; i < object.productSets.length; ++i) {
                                    if (typeof object.productSets[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ListProductSetsResponse.productSets: object expected");
                                    message.productSets[i] = $root.google.cloud.vision.v1p3beta1.ProductSet.fromObject(object.productSets[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductSetsResponse} message ListProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productSets = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.productSets && message.productSets.length) {
                                object.productSets = [];
                                for (var j = 0; j < message.productSets.length; ++j)
                                    object.productSets[j] = $root.google.cloud.vision.v1p3beta1.ProductSet.toObject(message.productSets[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductSetsResponse";
                        };
    
                        return ListProductSetsResponse;
                    })();
    
                    v1p3beta1.GetProductSetRequest = (function() {
    
                        /**
                         * Properties of a GetProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IGetProductSetRequest
                         * @property {string|null} [name] GetProductSetRequest name
                         */
    
                        /**
                         * Constructs a new GetProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a GetProductSetRequest.
                         * @implements IGetProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest=} [properties] Properties to set
                         */
                        function GetProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @instance
                         */
                        GetProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.GetProductSetRequest} GetProductSetRequest instance
                         */
                        GetProductSetRequest.create = function create(properties) {
                            return new GetProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.GetProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.GetProductSetRequest} GetProductSetRequest
                         */
                        GetProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.GetProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.GetProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.GetProductSetRequest} message GetProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.GetProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.GetProductSetRequest";
                        };
    
                        return GetProductSetRequest;
                    })();
    
                    v1p3beta1.UpdateProductSetRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IUpdateProductSetRequest
                         * @property {google.cloud.vision.v1p3beta1.IProductSet|null} [productSet] UpdateProductSetRequest productSet
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductSetRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an UpdateProductSetRequest.
                         * @implements IUpdateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest=} [properties] Properties to set
                         */
                        function UpdateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1p3beta1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * UpdateProductSetRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductSetRequest} UpdateProductSetRequest instance
                         */
                        UpdateProductSetRequest.create = function create(properties) {
                            return new UpdateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1p3beta1.ProductSet.encode(message.productSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.UpdateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         */
                        UpdateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.UpdateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.UpdateProductSetRequest();
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.UpdateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.UpdateProductSetRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.UpdateProductSetRequest} message UpdateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.productSet = null;
                                object.updateMask = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1p3beta1.ProductSet.toObject(message.productSet, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.UpdateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.UpdateProductSetRequest";
                        };
    
                        return UpdateProductSetRequest;
                    })();
    
                    v1p3beta1.DeleteProductSetRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IDeleteProductSetRequest
                         * @property {string|null} [name] DeleteProductSetRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a DeleteProductSetRequest.
                         * @implements IDeleteProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest=} [properties] Properties to set
                         */
                        function DeleteProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @instance
                         */
                        DeleteProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductSetRequest} DeleteProductSetRequest instance
                         */
                        DeleteProductSetRequest.create = function create(properties) {
                            return new DeleteProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.DeleteProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         */
                        DeleteProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.DeleteProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.DeleteProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.DeleteProductSetRequest} message DeleteProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.DeleteProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.DeleteProductSetRequest";
                        };
    
                        return DeleteProductSetRequest;
                    })();
    
                    v1p3beta1.CreateReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ICreateReferenceImageRequest
                         * @property {string|null} [parent] CreateReferenceImageRequest parent
                         * @property {google.cloud.vision.v1p3beta1.IReferenceImage|null} [referenceImage] CreateReferenceImageRequest referenceImage
                         * @property {string|null} [referenceImageId] CreateReferenceImageRequest referenceImageId
                         */
    
                        /**
                         * Constructs a new CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a CreateReferenceImageRequest.
                         * @implements ICreateReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest=} [properties] Properties to set
                         */
                        function CreateReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateReferenceImageRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.parent = "";
    
                        /**
                         * CreateReferenceImageRequest referenceImage.
                         * @member {google.cloud.vision.v1p3beta1.IReferenceImage|null|undefined} referenceImage
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImage = null;
    
                        /**
                         * CreateReferenceImageRequest referenceImageId.
                         * @member {string} referenceImageId
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImageId = "";
    
                        /**
                         * Creates a new CreateReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} CreateReferenceImageRequest instance
                         */
                        CreateReferenceImageRequest.create = function create(properties) {
                            return new CreateReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.referenceImage != null && Object.hasOwnProperty.call(message, "referenceImage"))
                                $root.google.cloud.vision.v1p3beta1.ReferenceImage.encode(message.referenceImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.referenceImageId != null && Object.hasOwnProperty.call(message, "referenceImageId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.referenceImageId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.referenceImage = $root.google.cloud.vision.v1p3beta1.ReferenceImage.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.referenceImageId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ReferenceImage.verify(message.referenceImage);
                                if (error)
                                    return "referenceImage." + error;
                            }
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                if (!$util.isString(message.referenceImageId))
                                    return "referenceImageId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         */
                        CreateReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.referenceImage != null) {
                                if (typeof object.referenceImage !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.CreateReferenceImageRequest.referenceImage: object expected");
                                message.referenceImage = $root.google.cloud.vision.v1p3beta1.ReferenceImage.fromObject(object.referenceImage);
                            }
                            if (object.referenceImageId != null)
                                message.referenceImageId = String(object.referenceImageId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.CreateReferenceImageRequest} message CreateReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.referenceImage = null;
                                object.referenceImageId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage"))
                                object.referenceImage = $root.google.cloud.vision.v1p3beta1.ReferenceImage.toObject(message.referenceImage, options);
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                object.referenceImageId = message.referenceImageId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.CreateReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.CreateReferenceImageRequest";
                        };
    
                        return CreateReferenceImageRequest;
                    })();
    
                    v1p3beta1.ListReferenceImagesRequest = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListReferenceImagesRequest
                         * @property {string|null} [parent] ListReferenceImagesRequest parent
                         * @property {number|null} [pageSize] ListReferenceImagesRequest pageSize
                         * @property {string|null} [pageToken] ListReferenceImagesRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListReferenceImagesRequest.
                         * @implements IListReferenceImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest=} [properties] Properties to set
                         */
                        function ListReferenceImagesRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.parent = "";
    
                        /**
                         * ListReferenceImagesRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} ListReferenceImagesRequest instance
                         */
                        ListReferenceImagesRequest.create = function create(properties) {
                            return new ListReferenceImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         */
                        ListReferenceImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListReferenceImagesRequest} message ListReferenceImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListReferenceImagesRequest";
                        };
    
                        return ListReferenceImagesRequest;
                    })();
    
                    v1p3beta1.ListReferenceImagesResponse = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListReferenceImagesResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IReferenceImage>|null} [referenceImages] ListReferenceImagesResponse referenceImages
                         * @property {number|null} [pageSize] ListReferenceImagesResponse pageSize
                         * @property {string|null} [nextPageToken] ListReferenceImagesResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListReferenceImagesResponse.
                         * @implements IListReferenceImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesResponse=} [properties] Properties to set
                         */
                        function ListReferenceImagesResponse(properties) {
                            this.referenceImages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ListReferenceImagesResponse pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} ListReferenceImagesResponse instance
                         */
                        ListReferenceImagesResponse.create = function create(properties) {
                            return new ListReferenceImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1p3beta1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         */
                        ListReferenceImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ListReferenceImagesResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1p3beta1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListReferenceImagesResponse} message ListReferenceImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.referenceImages = [];
                            if (options.defaults) {
                                object.pageSize = 0;
                                object.nextPageToken = "";
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1p3beta1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListReferenceImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListReferenceImagesResponse";
                        };
    
                        return ListReferenceImagesResponse;
                    })();
    
                    v1p3beta1.GetReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IGetReferenceImageRequest
                         * @property {string|null} [name] GetReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a GetReferenceImageRequest.
                         * @implements IGetReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest=} [properties] Properties to set
                         */
                        function GetReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @instance
                         */
                        GetReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.GetReferenceImageRequest} GetReferenceImageRequest instance
                         */
                        GetReferenceImageRequest.create = function create(properties) {
                            return new GetReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.GetReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         */
                        GetReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.GetReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.GetReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.GetReferenceImageRequest} message GetReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.GetReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.GetReferenceImageRequest";
                        };
    
                        return GetReferenceImageRequest;
                    })();
    
                    v1p3beta1.DeleteReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IDeleteReferenceImageRequest
                         * @property {string|null} [name] DeleteReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a DeleteReferenceImageRequest.
                         * @implements IDeleteReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         */
                        function DeleteReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @instance
                         */
                        DeleteReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest instance
                         */
                        DeleteReferenceImageRequest.create = function create(properties) {
                            return new DeleteReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         */
                        DeleteReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest} message DeleteReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest";
                        };
    
                        return DeleteReferenceImageRequest;
                    })();
    
                    v1p3beta1.AddProductToProductSetRequest = (function() {
    
                        /**
                         * Properties of an AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IAddProductToProductSetRequest
                         * @property {string|null} [name] AddProductToProductSetRequest name
                         * @property {string|null} [product] AddProductToProductSetRequest product
                         */
    
                        /**
                         * Constructs a new AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an AddProductToProductSetRequest.
                         * @implements IAddProductToProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest=} [properties] Properties to set
                         */
                        function AddProductToProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AddProductToProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.name = "";
    
                        /**
                         * AddProductToProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new AddProductToProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} AddProductToProductSetRequest instance
                         */
                        AddProductToProductSetRequest.create = function create(properties) {
                            return new AddProductToProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AddProductToProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AddProductToProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an AddProductToProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         */
                        AddProductToProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AddProductToProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.AddProductToProductSetRequest} message AddProductToProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AddProductToProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this AddProductToProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AddProductToProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AddProductToProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.AddProductToProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AddProductToProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.AddProductToProductSetRequest";
                        };
    
                        return AddProductToProductSetRequest;
                    })();
    
                    v1p3beta1.RemoveProductFromProductSetRequest = (function() {
    
                        /**
                         * Properties of a RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IRemoveProductFromProductSetRequest
                         * @property {string|null} [name] RemoveProductFromProductSetRequest name
                         * @property {string|null} [product] RemoveProductFromProductSetRequest product
                         */
    
                        /**
                         * Constructs a new RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a RemoveProductFromProductSetRequest.
                         * @implements IRemoveProductFromProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         */
                        function RemoveProductFromProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * RemoveProductFromProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.name = "";
    
                        /**
                         * RemoveProductFromProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new RemoveProductFromProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest instance
                         */
                        RemoveProductFromProductSetRequest.create = function create(properties) {
                            return new RemoveProductFromProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a RemoveProductFromProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        RemoveProductFromProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a RemoveProductFromProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         */
                        RemoveProductFromProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a RemoveProductFromProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        RemoveProductFromProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this RemoveProductFromProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        RemoveProductFromProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for RemoveProductFromProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        RemoveProductFromProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest";
                        };
    
                        return RemoveProductFromProductSetRequest;
                    })();
    
                    v1p3beta1.ListProductsInProductSetRequest = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductsInProductSetRequest
                         * @property {string|null} [name] ListProductsInProductSetRequest name
                         * @property {number|null} [pageSize] ListProductsInProductSetRequest pageSize
                         * @property {string|null} [pageToken] ListProductsInProductSetRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductsInProductSetRequest.
                         * @implements IListProductsInProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest=} [properties] Properties to set
                         */
                        function ListProductsInProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.name = "";
    
                        /**
                         * ListProductsInProductSetRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsInProductSetRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest instance
                         */
                        ListProductsInProductSetRequest.create = function create(properties) {
                            return new ListProductsInProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         */
                        ListProductsInProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest} message ListProductsInProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest";
                        };
    
                        return ListProductsInProductSetRequest;
                    })();
    
                    v1p3beta1.ListProductsInProductSetResponse = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IListProductsInProductSetResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IProduct>|null} [products] ListProductsInProductSetResponse products
                         * @property {string|null} [nextPageToken] ListProductsInProductSetResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a ListProductsInProductSetResponse.
                         * @implements IListProductsInProductSetResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetResponse=} [properties] Properties to set
                         */
                        function ListProductsInProductSetResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetResponse products.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IProduct>} products
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsInProductSetResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse instance
                         */
                        ListProductsInProductSetResponse.create = function create(properties) {
                            return new ListProductsInProductSetResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1p3beta1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         */
                        ListProductsInProductSetResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1p3beta1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse} message ListProductsInProductSetResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1p3beta1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse";
                        };
    
                        return ListProductsInProductSetResponse;
                    })();
    
                    v1p3beta1.ImportProductSetsGcsSource = (function() {
    
                        /**
                         * Properties of an ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImportProductSetsGcsSource
                         * @property {string|null} [csvFileUri] ImportProductSetsGcsSource csvFileUri
                         */
    
                        /**
                         * Constructs a new ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImportProductSetsGcsSource.
                         * @implements IImportProductSetsGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource=} [properties] Properties to set
                         */
                        function ImportProductSetsGcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsGcsSource csvFileUri.
                         * @member {string} csvFileUri
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @instance
                         */
                        ImportProductSetsGcsSource.prototype.csvFileUri = "";
    
                        /**
                         * Creates a new ImportProductSetsGcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource instance
                         */
                        ImportProductSetsGcsSource.create = function create(properties) {
                            return new ImportProductSetsGcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.csvFileUri != null && Object.hasOwnProperty.call(message, "csvFileUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.csvFileUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.csvFileUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsGcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsGcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                if (!$util.isString(message.csvFileUri))
                                    return "csvFileUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsGcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         */
                        ImportProductSetsGcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource();
                            if (object.csvFileUri != null)
                                message.csvFileUri = String(object.csvFileUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsGcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource} message ImportProductSetsGcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsGcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.csvFileUri = "";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                object.csvFileUri = message.csvFileUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsGcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsGcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsGcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource";
                        };
    
                        return ImportProductSetsGcsSource;
                    })();
    
                    v1p3beta1.ImportProductSetsInputConfig = (function() {
    
                        /**
                         * Properties of an ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImportProductSetsInputConfig
                         * @property {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource|null} [gcsSource] ImportProductSetsInputConfig gcsSource
                         */
    
                        /**
                         * Constructs a new ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImportProductSetsInputConfig.
                         * @implements IImportProductSetsInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig=} [properties] Properties to set
                         */
                        function ImportProductSetsInputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsInputConfig gcsSource.
                         * @member {google.cloud.vision.v1p3beta1.IImportProductSetsGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @instance
                         */
                        ImportProductSetsInputConfig.prototype.gcsSource = null;
    
                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;
    
                        /**
                         * ImportProductSetsInputConfig source.
                         * @member {"gcsSource"|undefined} source
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @instance
                         */
                        Object.defineProperty(ImportProductSetsInputConfig.prototype, "source", {
                            get: $util.oneOfGetter($oneOfFields = ["gcsSource"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });
    
                        /**
                         * Creates a new ImportProductSetsInputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig instance
                         */
                        ImportProductSetsInputConfig.create = function create(properties) {
                            return new ImportProductSetsInputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsInputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsInputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                properties.source = 1;
                                {
                                    var error = $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.verify(message.gcsSource);
                                    if (error)
                                        return "gcsSource." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsInputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         */
                        ImportProductSetsInputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.fromObject(object.gcsSource);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsInputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig} message ImportProductSetsInputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsInputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                object.gcsSource = $root.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource.toObject(message.gcsSource, options);
                                if (options.oneofs)
                                    object.source = "gcsSource";
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsInputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsInputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsInputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsInputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig";
                        };
    
                        return ImportProductSetsInputConfig;
                    })();
    
                    v1p3beta1.ImportProductSetsRequest = (function() {
    
                        /**
                         * Properties of an ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImportProductSetsRequest
                         * @property {string|null} [parent] ImportProductSetsRequest parent
                         * @property {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig|null} [inputConfig] ImportProductSetsRequest inputConfig
                         */
    
                        /**
                         * Constructs a new ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImportProductSetsRequest.
                         * @implements IImportProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest=} [properties] Properties to set
                         */
                        function ImportProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ImportProductSetsRequest inputConfig.
                         * @member {google.cloud.vision.v1p3beta1.IImportProductSetsInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.inputConfig = null;
    
                        /**
                         * Creates a new ImportProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsRequest} ImportProductSetsRequest instance
                         */
                        ImportProductSetsRequest.create = function create(properties) {
                            return new ImportProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.inputConfig = $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         */
                        ImportProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImportProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.fromObject(object.inputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImportProductSetsRequest} message ImportProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.inputConfig = null;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.toObject(message.inputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImportProductSetsRequest";
                        };
    
                        return ImportProductSetsRequest;
                    })();
    
                    v1p3beta1.ImportProductSetsResponse = (function() {
    
                        /**
                         * Properties of an ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IImportProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1p3beta1.IReferenceImage>|null} [referenceImages] ImportProductSetsResponse referenceImages
                         * @property {Array.<google.rpc.IStatus>|null} [statuses] ImportProductSetsResponse statuses
                         */
    
                        /**
                         * Constructs a new ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents an ImportProductSetsResponse.
                         * @implements IImportProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsResponse=} [properties] Properties to set
                         */
                        function ImportProductSetsResponse(properties) {
                            this.referenceImages = [];
                            this.statuses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ImportProductSetsResponse statuses.
                         * @member {Array.<google.rpc.IStatus>} statuses
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.statuses = $util.emptyArray;
    
                        /**
                         * Creates a new ImportProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsResponse} ImportProductSetsResponse instance
                         */
                        ImportProductSetsResponse.create = function create(properties) {
                            return new ImportProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.statuses != null && message.statuses.length)
                                for (var i = 0; i < message.statuses.length; ++i)
                                    $root.google.rpc.Status.encode(message.statuses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1p3beta1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.statuses && message.statuses.length))
                                            message.statuses = [];
                                        message.statuses.push($root.google.rpc.Status.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.statuses != null && message.hasOwnProperty("statuses")) {
                                if (!Array.isArray(message.statuses))
                                    return "statuses: array expected";
                                for (var i = 0; i < message.statuses.length; ++i) {
                                    var error = $root.google.rpc.Status.verify(message.statuses[i]);
                                    if (error)
                                        return "statuses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         */
                        ImportProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.ImportProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.ImportProductSetsResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1p3beta1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.statuses) {
                                if (!Array.isArray(object.statuses))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsResponse.statuses: array expected");
                                message.statuses = [];
                                for (var i = 0; i < object.statuses.length; ++i) {
                                    if (typeof object.statuses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.ImportProductSetsResponse.statuses: object expected");
                                    message.statuses[i] = $root.google.rpc.Status.fromObject(object.statuses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ImportProductSetsResponse} message ImportProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.referenceImages = [];
                                object.statuses = [];
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1p3beta1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.statuses && message.statuses.length) {
                                object.statuses = [];
                                for (var j = 0; j < message.statuses.length; ++j)
                                    object.statuses[j] = $root.google.rpc.Status.toObject(message.statuses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.ImportProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.ImportProductSetsResponse";
                        };
    
                        return ImportProductSetsResponse;
                    })();
    
                    v1p3beta1.BatchOperationMetadata = (function() {
    
                        /**
                         * Properties of a BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IBatchOperationMetadata
                         * @property {google.cloud.vision.v1p3beta1.BatchOperationMetadata.State|null} [state] BatchOperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [submitTime] BatchOperationMetadata submitTime
                         * @property {google.protobuf.ITimestamp|null} [endTime] BatchOperationMetadata endTime
                         */
    
                        /**
                         * Constructs a new BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a BatchOperationMetadata.
                         * @implements IBatchOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IBatchOperationMetadata=} [properties] Properties to set
                         */
                        function BatchOperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchOperationMetadata state.
                         * @member {google.cloud.vision.v1p3beta1.BatchOperationMetadata.State} state
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.state = 0;
    
                        /**
                         * BatchOperationMetadata submitTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} submitTime
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.submitTime = null;
    
                        /**
                         * BatchOperationMetadata endTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} endTime
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.endTime = null;
    
                        /**
                         * Creates a new BatchOperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.BatchOperationMetadata} BatchOperationMetadata instance
                         */
                        BatchOperationMetadata.create = function create(properties) {
                            return new BatchOperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchOperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime"))
                                $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
                                $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.BatchOperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchOperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchOperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.submitTime != null && message.hasOwnProperty("submitTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.submitTime);
                                if (error)
                                    return "submitTime." + error;
                            }
                            if (message.endTime != null && message.hasOwnProperty("endTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.endTime);
                                if (error)
                                    return "endTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchOperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.BatchOperationMetadata} BatchOperationMetadata
                         */
                        BatchOperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "PROCESSING":
                            case 1:
                                message.state = 1;
                                break;
                            case "SUCCESSFUL":
                            case 2:
                                message.state = 2;
                                break;
                            case "FAILED":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.submitTime != null) {
                                if (typeof object.submitTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BatchOperationMetadata.submitTime: object expected");
                                message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime);
                            }
                            if (object.endTime != null) {
                                if (typeof object.endTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.BatchOperationMetadata.endTime: object expected");
                                message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchOperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.BatchOperationMetadata} message BatchOperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchOperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.submitTime = null;
                                object.endTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p3beta1.BatchOperationMetadata.State[message.state] : message.state;
                            if (message.submitTime != null && message.hasOwnProperty("submitTime"))
                                object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options);
                            if (message.endTime != null && message.hasOwnProperty("endTime"))
                                object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this BatchOperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchOperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchOperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.BatchOperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.BatchOperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1p3beta1.BatchOperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} PROCESSING=1 PROCESSING value
                         * @property {number} SUCCESSFUL=2 SUCCESSFUL value
                         * @property {number} FAILED=3 FAILED value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        BatchOperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "PROCESSING"] = 1;
                            values[valuesById[2] = "SUCCESSFUL"] = 2;
                            values[valuesById[3] = "FAILED"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return BatchOperationMetadata;
                    })();
    
                    v1p3beta1.TextAnnotation = (function() {
    
                        /**
                         * Properties of a TextAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ITextAnnotation
                         * @property {Array.<google.cloud.vision.v1p3beta1.IPage>|null} [pages] TextAnnotation pages
                         * @property {string|null} [text] TextAnnotation text
                         */
    
                        /**
                         * Constructs a new TextAnnotation.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a TextAnnotation.
                         * @implements ITextAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ITextAnnotation=} [properties] Properties to set
                         */
                        function TextAnnotation(properties) {
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextAnnotation pages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IPage>} pages
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.pages = $util.emptyArray;
    
                        /**
                         * TextAnnotation text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.text = "";
    
                        /**
                         * Creates a new TextAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.TextAnnotation} TextAnnotation instance
                         */
                        TextAnnotation.create = function create(properties) {
                            return new TextAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.pages != null && message.pages.length)
                                for (var i = 0; i < message.pages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        message.pages.push($root.google.cloud.vision.v1p3beta1.Page.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.text = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Page.verify(message.pages[i]);
                                    if (error)
                                        return "pages." + error;
                                }
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a TextAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.TextAnnotation} TextAnnotation
                         */
                        TextAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.TextAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation();
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.TextAnnotation.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i) {
                                    if (typeof object.pages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.TextAnnotation.pages: object expected");
                                    message.pages[i] = $root.google.cloud.vision.v1p3beta1.Page.fromObject(object.pages[i]);
                                }
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.TextAnnotation} message TextAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.pages = [];
                            if (options.defaults)
                                object.text = "";
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = $root.google.cloud.vision.v1p3beta1.Page.toObject(message.pages[j], options);
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            return object;
                        };
    
                        /**
                         * Converts this TextAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.TextAnnotation";
                        };
    
                        TextAnnotation.DetectedLanguage = (function() {
    
                            /**
                             * Properties of a DetectedLanguage.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @interface IDetectedLanguage
                             * @property {string|null} [languageCode] DetectedLanguage languageCode
                             * @property {number|null} [confidence] DetectedLanguage confidence
                             */
    
                            /**
                             * Constructs a new DetectedLanguage.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @classdesc Represents a DetectedLanguage.
                             * @implements IDetectedLanguage
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             */
                            function DetectedLanguage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedLanguage languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.languageCode = "";
    
                            /**
                             * DetectedLanguage confidence.
                             * @member {number} confidence
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.confidence = 0;
    
                            /**
                             * Creates a new DetectedLanguage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} DetectedLanguage instance
                             */
                            DetectedLanguage.create = function create(properties) {
                                return new DetectedLanguage(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
                                if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.confidence = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedLanguage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedLanguage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    if (typeof message.confidence !== "number")
                                        return "confidence: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             */
                            DetectedLanguage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage();
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.confidence != null)
                                    message.confidence = Number(object.confidence);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage} message DetectedLanguage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedLanguage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.languageCode = "";
                                    object.confidence = 0;
                                }
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedLanguage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedLanguage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedLanguage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage";
                            };
    
                            return DetectedLanguage;
                        })();
    
                        TextAnnotation.DetectedBreak = (function() {
    
                            /**
                             * Properties of a DetectedBreak.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @interface IDetectedBreak
                             * @property {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType|null} [type] DetectedBreak type
                             * @property {boolean|null} [isPrefix] DetectedBreak isPrefix
                             */
    
                            /**
                             * Constructs a new DetectedBreak.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @classdesc Represents a DetectedBreak.
                             * @implements IDetectedBreak
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             */
                            function DetectedBreak(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedBreak type.
                             * @member {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType} type
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.type = 0;
    
                            /**
                             * DetectedBreak isPrefix.
                             * @member {boolean} isPrefix
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.isPrefix = false;
    
                            /**
                             * Creates a new DetectedBreak instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} DetectedBreak instance
                             */
                            DetectedBreak.create = function create(properties) {
                                return new DetectedBreak(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                                if (message.isPrefix != null && Object.hasOwnProperty.call(message, "isPrefix"))
                                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isPrefix);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 2: {
                                            message.isPrefix = reader.bool();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedBreak message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedBreak.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                        break;
                                    }
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    if (typeof message.isPrefix !== "boolean")
                                        return "isPrefix: boolean expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             */
                            DetectedBreak.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "SPACE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "SURE_SPACE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "EOL_SURE_SPACE":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "HYPHEN":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LINE_BREAK":
                                case 5:
                                    message.type = 5;
                                    break;
                                }
                                if (object.isPrefix != null)
                                    message.isPrefix = Boolean(object.isPrefix);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak} message DetectedBreak
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedBreak.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN" : 0;
                                    object.isPrefix = false;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type;
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    object.isPrefix = message.isPrefix;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedBreak to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedBreak.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedBreak
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak";
                            };
    
                            /**
                             * BreakType enum.
                             * @name google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.BreakType
                             * @enum {number}
                             * @property {number} UNKNOWN=0 UNKNOWN value
                             * @property {number} SPACE=1 SPACE value
                             * @property {number} SURE_SPACE=2 SURE_SPACE value
                             * @property {number} EOL_SURE_SPACE=3 EOL_SURE_SPACE value
                             * @property {number} HYPHEN=4 HYPHEN value
                             * @property {number} LINE_BREAK=5 LINE_BREAK value
                             */
                            DetectedBreak.BreakType = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN"] = 0;
                                values[valuesById[1] = "SPACE"] = 1;
                                values[valuesById[2] = "SURE_SPACE"] = 2;
                                values[valuesById[3] = "EOL_SURE_SPACE"] = 3;
                                values[valuesById[4] = "HYPHEN"] = 4;
                                values[valuesById[5] = "LINE_BREAK"] = 5;
                                return values;
                            })();
    
                            return DetectedBreak;
                        })();
    
                        TextAnnotation.TextProperty = (function() {
    
                            /**
                             * Properties of a TextProperty.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @interface ITextProperty
                             * @property {Array.<google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage>|null} [detectedLanguages] TextProperty detectedLanguages
                             * @property {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak|null} [detectedBreak] TextProperty detectedBreak
                             */
    
                            /**
                             * Constructs a new TextProperty.
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation
                             * @classdesc Represents a TextProperty.
                             * @implements ITextProperty
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             */
                            function TextProperty(properties) {
                                this.detectedLanguages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * TextProperty detectedLanguages.
                             * @member {Array.<google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedLanguage>} detectedLanguages
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedLanguages = $util.emptyArray;
    
                            /**
                             * TextProperty detectedBreak.
                             * @member {google.cloud.vision.v1p3beta1.TextAnnotation.IDetectedBreak|null|undefined} detectedBreak
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedBreak = null;
    
                            /**
                             * Creates a new TextProperty instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} TextProperty instance
                             */
                            TextProperty.create = function create(properties) {
                                return new TextProperty(properties);
                            };
    
                            /**
                             * Encodes the specified TextProperty message. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.detectedLanguages != null && message.detectedLanguages.length)
                                    for (var i = 0; i < message.detectedLanguages.length; ++i)
                                        $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
                                    $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified TextProperty message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            if (!(message.detectedLanguages && message.detectedLanguages.length))
                                                message.detectedLanguages = [];
                                            message.detectedLanguages.push($root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 2: {
                                            message.detectedBreak = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a TextProperty message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            TextProperty.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
                                    if (!Array.isArray(message.detectedLanguages))
                                        return "detectedLanguages: array expected";
                                    for (var i = 0; i < message.detectedLanguages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.verify(message.detectedLanguages[i]);
                                        if (error)
                                            return "detectedLanguages." + error;
                                    }
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
                                    var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.verify(message.detectedBreak);
                                    if (error)
                                        return "detectedBreak." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a TextProperty message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} TextProperty
                             */
                            TextProperty.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty();
                                if (object.detectedLanguages) {
                                    if (!Array.isArray(object.detectedLanguages))
                                        throw TypeError(".google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.detectedLanguages: array expected");
                                    message.detectedLanguages = [];
                                    for (var i = 0; i < object.detectedLanguages.length; ++i) {
                                        if (typeof object.detectedLanguages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.detectedLanguages: object expected");
                                        message.detectedLanguages[i] = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.fromObject(object.detectedLanguages[i]);
                                    }
                                }
                                if (object.detectedBreak != null) {
                                    if (typeof object.detectedBreak !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.detectedBreak: object expected");
                                    message.detectedBreak = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.fromObject(object.detectedBreak);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a TextProperty message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty} message TextProperty
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            TextProperty.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults)
                                    object.detectedLanguages = [];
                                if (options.defaults)
                                    object.detectedBreak = null;
                                if (message.detectedLanguages && message.detectedLanguages.length) {
                                    object.detectedLanguages = [];
                                    for (var j = 0; j < message.detectedLanguages.length; ++j)
                                        object.detectedLanguages[j] = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.toObject(message.detectedLanguages[j], options);
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
                                    object.detectedBreak = $root.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.toObject(message.detectedBreak, options);
                                return object;
                            };
    
                            /**
                             * Converts this TextProperty to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            TextProperty.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for TextProperty
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            TextProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty";
                            };
    
                            return TextProperty;
                        })();
    
                        return TextAnnotation;
                    })();
    
                    v1p3beta1.Page = (function() {
    
                        /**
                         * Properties of a Page.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IPage
                         * @property {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null} [property] Page property
                         * @property {number|null} [width] Page width
                         * @property {number|null} [height] Page height
                         * @property {Array.<google.cloud.vision.v1p3beta1.IBlock>|null} [blocks] Page blocks
                         * @property {number|null} [confidence] Page confidence
                         */
    
                        /**
                         * Constructs a new Page.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Page.
                         * @implements IPage
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IPage=} [properties] Properties to set
                         */
                        function Page(properties) {
                            this.blocks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Page property.
                         * @member {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         */
                        Page.prototype.property = null;
    
                        /**
                         * Page width.
                         * @member {number} width
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         */
                        Page.prototype.width = 0;
    
                        /**
                         * Page height.
                         * @member {number} height
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         */
                        Page.prototype.height = 0;
    
                        /**
                         * Page blocks.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IBlock>} blocks
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         */
                        Page.prototype.blocks = $util.emptyArray;
    
                        /**
                         * Page confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         */
                        Page.prototype.confidence = 0;
    
                        /**
                         * Creates a new Page instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Page} Page instance
                         */
                        Page.create = function create(properties) {
                            return new Page(properties);
                        };
    
                        /**
                         * Encodes the specified Page message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Page.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.width);
                            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height);
                            if (message.blocks != null && message.blocks.length)
                                for (var i = 0; i < message.blocks.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Block.encode(message.blocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Page.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Page();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.width = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.height = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        if (!(message.blocks && message.blocks.length))
                                            message.blocks = [];
                                        message.blocks.push($root.google.cloud.vision.v1p3beta1.Block.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Page message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Page.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.width != null && message.hasOwnProperty("width"))
                                if (!$util.isInteger(message.width))
                                    return "width: integer expected";
                            if (message.height != null && message.hasOwnProperty("height"))
                                if (!$util.isInteger(message.height))
                                    return "height: integer expected";
                            if (message.blocks != null && message.hasOwnProperty("blocks")) {
                                if (!Array.isArray(message.blocks))
                                    return "blocks: array expected";
                                for (var i = 0; i < message.blocks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Block.verify(message.blocks[i]);
                                    if (error)
                                        return "blocks." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Page message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Page} Page
                         */
                        Page.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Page)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Page();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Page.property: object expected");
                                message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.width != null)
                                message.width = object.width | 0;
                            if (object.height != null)
                                message.height = object.height | 0;
                            if (object.blocks) {
                                if (!Array.isArray(object.blocks))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Page.blocks: array expected");
                                message.blocks = [];
                                for (var i = 0; i < object.blocks.length; ++i) {
                                    if (typeof object.blocks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.Page.blocks: object expected");
                                    message.blocks[i] = $root.google.cloud.vision.v1p3beta1.Block.fromObject(object.blocks[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Page message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Page} message Page
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Page.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.blocks = [];
                            if (options.defaults) {
                                object.property = null;
                                object.width = 0;
                                object.height = 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.width != null && message.hasOwnProperty("width"))
                                object.width = message.width;
                            if (message.height != null && message.hasOwnProperty("height"))
                                object.height = message.height;
                            if (message.blocks && message.blocks.length) {
                                object.blocks = [];
                                for (var j = 0; j < message.blocks.length; ++j)
                                    object.blocks[j] = $root.google.cloud.vision.v1p3beta1.Block.toObject(message.blocks[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Page to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Page.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Page
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Page
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Page";
                        };
    
                        return Page;
                    })();
    
                    v1p3beta1.Block = (function() {
    
                        /**
                         * Properties of a Block.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IBlock
                         * @property {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null} [property] Block property
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingBox] Block boundingBox
                         * @property {Array.<google.cloud.vision.v1p3beta1.IParagraph>|null} [paragraphs] Block paragraphs
                         * @property {google.cloud.vision.v1p3beta1.Block.BlockType|null} [blockType] Block blockType
                         * @property {number|null} [confidence] Block confidence
                         */
    
                        /**
                         * Constructs a new Block.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Block.
                         * @implements IBlock
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IBlock=} [properties] Properties to set
                         */
                        function Block(properties) {
                            this.paragraphs = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Block property.
                         * @member {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         */
                        Block.prototype.property = null;
    
                        /**
                         * Block boundingBox.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         */
                        Block.prototype.boundingBox = null;
    
                        /**
                         * Block paragraphs.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IParagraph>} paragraphs
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         */
                        Block.prototype.paragraphs = $util.emptyArray;
    
                        /**
                         * Block blockType.
                         * @member {google.cloud.vision.v1p3beta1.Block.BlockType} blockType
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         */
                        Block.prototype.blockType = 0;
    
                        /**
                         * Block confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         */
                        Block.prototype.confidence = 0;
    
                        /**
                         * Creates a new Block instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBlock=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Block} Block instance
                         */
                        Block.create = function create(properties) {
                            return new Block(properties);
                        };
    
                        /**
                         * Encodes the specified Block message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Block.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.paragraphs != null && message.paragraphs.length)
                                for (var i = 0; i < message.paragraphs.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.blockType != null && Object.hasOwnProperty.call(message, "blockType"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.blockType);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Block.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Block();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.paragraphs && message.paragraphs.length))
                                            message.paragraphs = [];
                                        message.paragraphs.push($root.google.cloud.vision.v1p3beta1.Paragraph.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.blockType = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Block message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Block.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
                                if (!Array.isArray(message.paragraphs))
                                    return "paragraphs: array expected";
                                for (var i = 0; i < message.paragraphs.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Paragraph.verify(message.paragraphs[i]);
                                    if (error)
                                        return "paragraphs." + error;
                                }
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                switch (message.blockType) {
                                default:
                                    return "blockType: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Block message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Block} Block
                         */
                        Block.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Block)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Block();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Block.property: object expected");
                                message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Block.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.paragraphs) {
                                if (!Array.isArray(object.paragraphs))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Block.paragraphs: array expected");
                                message.paragraphs = [];
                                for (var i = 0; i < object.paragraphs.length; ++i) {
                                    if (typeof object.paragraphs[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.Block.paragraphs: object expected");
                                    message.paragraphs[i] = $root.google.cloud.vision.v1p3beta1.Paragraph.fromObject(object.paragraphs[i]);
                                }
                            }
                            switch (object.blockType) {
                            default:
                                if (typeof object.blockType === "number") {
                                    message.blockType = object.blockType;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blockType = 0;
                                break;
                            case "TEXT":
                            case 1:
                                message.blockType = 1;
                                break;
                            case "TABLE":
                            case 2:
                                message.blockType = 2;
                                break;
                            case "PICTURE":
                            case 3:
                                message.blockType = 3;
                                break;
                            case "RULER":
                            case 4:
                                message.blockType = 4;
                                break;
                            case "BARCODE":
                            case 5:
                                message.blockType = 5;
                                break;
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Block message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Block} message Block
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Block.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.paragraphs = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.blockType = options.enums === String ? "UNKNOWN" : 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.paragraphs && message.paragraphs.length) {
                                object.paragraphs = [];
                                for (var j = 0; j < message.paragraphs.length; ++j)
                                    object.paragraphs[j] = $root.google.cloud.vision.v1p3beta1.Paragraph.toObject(message.paragraphs[j], options);
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                object.blockType = options.enums === String ? $root.google.cloud.vision.v1p3beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p3beta1.Block.BlockType[message.blockType] : message.blockType;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Block to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Block.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Block
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Block
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Block";
                        };
    
                        /**
                         * BlockType enum.
                         * @name google.cloud.vision.v1p3beta1.Block.BlockType
                         * @enum {number}
                         * @property {number} UNKNOWN=0 UNKNOWN value
                         * @property {number} TEXT=1 TEXT value
                         * @property {number} TABLE=2 TABLE value
                         * @property {number} PICTURE=3 PICTURE value
                         * @property {number} RULER=4 RULER value
                         * @property {number} BARCODE=5 BARCODE value
                         */
                        Block.BlockType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNKNOWN"] = 0;
                            values[valuesById[1] = "TEXT"] = 1;
                            values[valuesById[2] = "TABLE"] = 2;
                            values[valuesById[3] = "PICTURE"] = 3;
                            values[valuesById[4] = "RULER"] = 4;
                            values[valuesById[5] = "BARCODE"] = 5;
                            return values;
                        })();
    
                        return Block;
                    })();
    
                    v1p3beta1.Paragraph = (function() {
    
                        /**
                         * Properties of a Paragraph.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IParagraph
                         * @property {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null} [property] Paragraph property
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingBox] Paragraph boundingBox
                         * @property {Array.<google.cloud.vision.v1p3beta1.IWord>|null} [words] Paragraph words
                         * @property {number|null} [confidence] Paragraph confidence
                         */
    
                        /**
                         * Constructs a new Paragraph.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Paragraph.
                         * @implements IParagraph
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IParagraph=} [properties] Properties to set
                         */
                        function Paragraph(properties) {
                            this.words = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Paragraph property.
                         * @member {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.property = null;
    
                        /**
                         * Paragraph boundingBox.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.boundingBox = null;
    
                        /**
                         * Paragraph words.
                         * @member {Array.<google.cloud.vision.v1p3beta1.IWord>} words
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.words = $util.emptyArray;
    
                        /**
                         * Paragraph confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.confidence = 0;
    
                        /**
                         * Creates a new Paragraph instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IParagraph=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Paragraph} Paragraph instance
                         */
                        Paragraph.create = function create(properties) {
                            return new Paragraph(properties);
                        };
    
                        /**
                         * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Paragraph.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.words != null && message.words.length)
                                for (var i = 0; i < message.words.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Word.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Paragraph.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Paragraph();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.words && message.words.length))
                                            message.words = [];
                                        message.words.push($root.google.cloud.vision.v1p3beta1.Word.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Paragraph message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Paragraph.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.words != null && message.hasOwnProperty("words")) {
                                if (!Array.isArray(message.words))
                                    return "words: array expected";
                                for (var i = 0; i < message.words.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Word.verify(message.words[i]);
                                    if (error)
                                        return "words." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Paragraph} Paragraph
                         */
                        Paragraph.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Paragraph)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Paragraph();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Paragraph.property: object expected");
                                message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Paragraph.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.words) {
                                if (!Array.isArray(object.words))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Paragraph.words: array expected");
                                message.words = [];
                                for (var i = 0; i < object.words.length; ++i) {
                                    if (typeof object.words[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.Paragraph.words: object expected");
                                    message.words[i] = $root.google.cloud.vision.v1p3beta1.Word.fromObject(object.words[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Paragraph} message Paragraph
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Paragraph.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.words = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.words && message.words.length) {
                                object.words = [];
                                for (var j = 0; j < message.words.length; ++j)
                                    object.words[j] = $root.google.cloud.vision.v1p3beta1.Word.toObject(message.words[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Paragraph to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Paragraph.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Paragraph
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Paragraph
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Paragraph";
                        };
    
                        return Paragraph;
                    })();
    
                    v1p3beta1.Word = (function() {
    
                        /**
                         * Properties of a Word.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IWord
                         * @property {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null} [property] Word property
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingBox] Word boundingBox
                         * @property {Array.<google.cloud.vision.v1p3beta1.ISymbol>|null} [symbols] Word symbols
                         * @property {number|null} [confidence] Word confidence
                         */
    
                        /**
                         * Constructs a new Word.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Word.
                         * @implements IWord
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IWord=} [properties] Properties to set
                         */
                        function Word(properties) {
                            this.symbols = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Word property.
                         * @member {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @instance
                         */
                        Word.prototype.property = null;
    
                        /**
                         * Word boundingBox.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @instance
                         */
                        Word.prototype.boundingBox = null;
    
                        /**
                         * Word symbols.
                         * @member {Array.<google.cloud.vision.v1p3beta1.ISymbol>} symbols
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @instance
                         */
                        Word.prototype.symbols = $util.emptyArray;
    
                        /**
                         * Word confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @instance
                         */
                        Word.prototype.confidence = 0;
    
                        /**
                         * Creates a new Word instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWord=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Word} Word instance
                         */
                        Word.create = function create(properties) {
                            return new Word(properties);
                        };
    
                        /**
                         * Encodes the specified Word message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Word.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.symbols != null && message.symbols.length)
                                for (var i = 0; i < message.symbols.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.Symbol.encode(message.symbols[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Word message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Word.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Word();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.symbols && message.symbols.length))
                                            message.symbols = [];
                                        message.symbols.push($root.google.cloud.vision.v1p3beta1.Symbol.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Word message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Word.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.symbols != null && message.hasOwnProperty("symbols")) {
                                if (!Array.isArray(message.symbols))
                                    return "symbols: array expected";
                                for (var i = 0; i < message.symbols.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.Symbol.verify(message.symbols[i]);
                                    if (error)
                                        return "symbols." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Word message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Word} Word
                         */
                        Word.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Word)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Word();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Word.property: object expected");
                                message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Word.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.symbols) {
                                if (!Array.isArray(object.symbols))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Word.symbols: array expected");
                                message.symbols = [];
                                for (var i = 0; i < object.symbols.length; ++i) {
                                    if (typeof object.symbols[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.Word.symbols: object expected");
                                    message.symbols[i] = $root.google.cloud.vision.v1p3beta1.Symbol.fromObject(object.symbols[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Word message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Word} message Word
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Word.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.symbols = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.symbols && message.symbols.length) {
                                object.symbols = [];
                                for (var j = 0; j < message.symbols.length; ++j)
                                    object.symbols[j] = $root.google.cloud.vision.v1p3beta1.Symbol.toObject(message.symbols[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Word to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Word.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Word
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Word
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Word.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Word";
                        };
    
                        return Word;
                    })();
    
                    v1p3beta1.Symbol = (function() {
    
                        /**
                         * Properties of a Symbol.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface ISymbol
                         * @property {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null} [property] Symbol property
                         * @property {google.cloud.vision.v1p3beta1.IBoundingPoly|null} [boundingBox] Symbol boundingBox
                         * @property {string|null} [text] Symbol text
                         * @property {number|null} [confidence] Symbol confidence
                         */
    
                        /**
                         * Constructs a new Symbol.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a Symbol.
                         * @implements ISymbol
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.ISymbol=} [properties] Properties to set
                         */
                        function Symbol(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Symbol property.
                         * @member {google.cloud.vision.v1p3beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.property = null;
    
                        /**
                         * Symbol boundingBox.
                         * @member {google.cloud.vision.v1p3beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.boundingBox = null;
    
                        /**
                         * Symbol text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.text = "";
    
                        /**
                         * Symbol confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.confidence = 0;
    
                        /**
                         * Creates a new Symbol instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISymbol=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.Symbol} Symbol instance
                         */
                        Symbol.create = function create(properties) {
                            return new Symbol(properties);
                        };
    
                        /**
                         * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.vision.v1p3beta1.Symbol.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p3beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.Symbol.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.Symbol();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.text = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Symbol message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Symbol.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p3beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.Symbol} Symbol
                         */
                        Symbol.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.Symbol)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.Symbol();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Symbol.property: object expected");
                                message.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p3beta1.Symbol.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Symbol message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.Symbol} message Symbol
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Symbol.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.text = "";
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p3beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Symbol to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Symbol.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Symbol
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.Symbol
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.Symbol";
                        };
    
                        return Symbol;
                    })();
    
                    v1p3beta1.WebDetection = (function() {
    
                        /**
                         * Properties of a WebDetection.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @interface IWebDetection
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebEntity>|null} [webEntities] WebDetection webEntities
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebDetection fullMatchingImages
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebDetection partialMatchingImages
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebPage>|null} [pagesWithMatchingImages] WebDetection pagesWithMatchingImages
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>|null} [visuallySimilarImages] WebDetection visuallySimilarImages
                         * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebLabel>|null} [bestGuessLabels] WebDetection bestGuessLabels
                         */
    
                        /**
                         * Constructs a new WebDetection.
                         * @memberof google.cloud.vision.v1p3beta1
                         * @classdesc Represents a WebDetection.
                         * @implements IWebDetection
                         * @constructor
                         * @param {google.cloud.vision.v1p3beta1.IWebDetection=} [properties] Properties to set
                         */
                        function WebDetection(properties) {
                            this.webEntities = [];
                            this.fullMatchingImages = [];
                            this.partialMatchingImages = [];
                            this.pagesWithMatchingImages = [];
                            this.visuallySimilarImages = [];
                            this.bestGuessLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetection webEntities.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebEntity>} webEntities
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.webEntities = $util.emptyArray;
    
                        /**
                         * WebDetection fullMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>} fullMatchingImages
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.fullMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection partialMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>} partialMatchingImages
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.partialMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection pagesWithMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebPage>} pagesWithMatchingImages
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.pagesWithMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection visuallySimilarImages.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>} visuallySimilarImages
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.visuallySimilarImages = $util.emptyArray;
    
                        /**
                         * WebDetection bestGuessLabels.
                         * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebLabel>} bestGuessLabels
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.bestGuessLabels = $util.emptyArray;
    
                        /**
                         * Creates a new WebDetection instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetection=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p3beta1.WebDetection} WebDetection instance
                         */
                        WebDetection.create = function create(properties) {
                            return new WebDetection(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetection message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.webEntities != null && message.webEntities.length)
                                for (var i = 0; i < message.webEntities.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.encode(message.webEntities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pagesWithMatchingImages != null && message.pagesWithMatchingImages.length)
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage.encode(message.pagesWithMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.visuallySimilarImages != null && message.visuallySimilarImages.length)
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.encode(message.visuallySimilarImages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.bestGuessLabels != null && message.bestGuessLabels.length)
                                for (var i = 0; i < message.bestGuessLabels.length; ++i)
                                    $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.encode(message.bestGuessLabels[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetection message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p3beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetection();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.webEntities && message.webEntities.length))
                                            message.webEntities = [];
                                        message.webEntities.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                            message.fullMatchingImages = [];
                                        message.fullMatchingImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                            message.partialMatchingImages = [];
                                        message.partialMatchingImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pagesWithMatchingImages && message.pagesWithMatchingImages.length))
                                            message.pagesWithMatchingImages = [];
                                        message.pagesWithMatchingImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebPage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.visuallySimilarImages && message.visuallySimilarImages.length))
                                            message.visuallySimilarImages = [];
                                        message.visuallySimilarImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 8: {
                                        if (!(message.bestGuessLabels && message.bestGuessLabels.length))
                                            message.bestGuessLabels = [];
                                        message.bestGuessLabels.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p3beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetection message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetection.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.webEntities != null && message.hasOwnProperty("webEntities")) {
                                if (!Array.isArray(message.webEntities))
                                    return "webEntities: array expected";
                                for (var i = 0; i < message.webEntities.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.verify(message.webEntities[i]);
                                    if (error)
                                        return "webEntities." + error;
                                }
                            }
                            if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                if (!Array.isArray(message.fullMatchingImages))
                                    return "fullMatchingImages: array expected";
                                for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                    if (error)
                                        return "fullMatchingImages." + error;
                                }
                            }
                            if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                if (!Array.isArray(message.partialMatchingImages))
                                    return "partialMatchingImages: array expected";
                                for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                    if (error)
                                        return "partialMatchingImages." + error;
                                }
                            }
                            if (message.pagesWithMatchingImages != null && message.hasOwnProperty("pagesWithMatchingImages")) {
                                if (!Array.isArray(message.pagesWithMatchingImages))
                                    return "pagesWithMatchingImages: array expected";
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage.verify(message.pagesWithMatchingImages[i]);
                                    if (error)
                                        return "pagesWithMatchingImages." + error;
                                }
                            }
                            if (message.visuallySimilarImages != null && message.hasOwnProperty("visuallySimilarImages")) {
                                if (!Array.isArray(message.visuallySimilarImages))
                                    return "visuallySimilarImages: array expected";
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify(message.visuallySimilarImages[i]);
                                    if (error)
                                        return "visuallySimilarImages." + error;
                                }
                            }
                            if (message.bestGuessLabels != null && message.hasOwnProperty("bestGuessLabels")) {
                                if (!Array.isArray(message.bestGuessLabels))
                                    return "bestGuessLabels: array expected";
                                for (var i = 0; i < message.bestGuessLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.verify(message.bestGuessLabels[i]);
                                    if (error)
                                        return "bestGuessLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a WebDetection message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p3beta1.WebDetection} WebDetection
                         */
                        WebDetection.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetection)
                                return object;
                            var message = new $root.google.cloud.vision.v1p3beta1.WebDetection();
                            if (object.webEntities) {
                                if (!Array.isArray(object.webEntities))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.webEntities: array expected");
                                message.webEntities = [];
                                for (var i = 0; i < object.webEntities.length; ++i) {
                                    if (typeof object.webEntities[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.webEntities: object expected");
                                    message.webEntities[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.fromObject(object.webEntities[i]);
                                }
                            }
                            if (object.fullMatchingImages) {
                                if (!Array.isArray(object.fullMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.fullMatchingImages: array expected");
                                message.fullMatchingImages = [];
                                for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                    if (typeof object.fullMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.fullMatchingImages: object expected");
                                    message.fullMatchingImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                }
                            }
                            if (object.partialMatchingImages) {
                                if (!Array.isArray(object.partialMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.partialMatchingImages: array expected");
                                message.partialMatchingImages = [];
                                for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                    if (typeof object.partialMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.partialMatchingImages: object expected");
                                    message.partialMatchingImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                }
                            }
                            if (object.pagesWithMatchingImages) {
                                if (!Array.isArray(object.pagesWithMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.pagesWithMatchingImages: array expected");
                                message.pagesWithMatchingImages = [];
                                for (var i = 0; i < object.pagesWithMatchingImages.length; ++i) {
                                    if (typeof object.pagesWithMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.pagesWithMatchingImages: object expected");
                                    message.pagesWithMatchingImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage.fromObject(object.pagesWithMatchingImages[i]);
                                }
                            }
                            if (object.visuallySimilarImages) {
                                if (!Array.isArray(object.visuallySimilarImages))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.visuallySimilarImages: array expected");
                                message.visuallySimilarImages = [];
                                for (var i = 0; i < object.visuallySimilarImages.length; ++i) {
                                    if (typeof object.visuallySimilarImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.visuallySimilarImages: object expected");
                                    message.visuallySimilarImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.fromObject(object.visuallySimilarImages[i]);
                                }
                            }
                            if (object.bestGuessLabels) {
                                if (!Array.isArray(object.bestGuessLabels))
                                    throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.bestGuessLabels: array expected");
                                message.bestGuessLabels = [];
                                for (var i = 0; i < object.bestGuessLabels.length; ++i) {
                                    if (typeof object.bestGuessLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.bestGuessLabels: object expected");
                                    message.bestGuessLabels[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.fromObject(object.bestGuessLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetection message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p3beta1.WebDetection} message WebDetection
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetection.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.webEntities = [];
                                object.fullMatchingImages = [];
                                object.partialMatchingImages = [];
                                object.pagesWithMatchingImages = [];
                                object.visuallySimilarImages = [];
                                object.bestGuessLabels = [];
                            }
                            if (message.webEntities && message.webEntities.length) {
                                object.webEntities = [];
                                for (var j = 0; j < message.webEntities.length; ++j)
                                    object.webEntities[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.toObject(message.webEntities[j], options);
                            }
                            if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                object.fullMatchingImages = [];
                                for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                    object.fullMatchingImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                            }
                            if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                object.partialMatchingImages = [];
                                for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                    object.partialMatchingImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                            }
                            if (message.pagesWithMatchingImages && message.pagesWithMatchingImages.length) {
                                object.pagesWithMatchingImages = [];
                                for (var j = 0; j < message.pagesWithMatchingImages.length; ++j)
                                    object.pagesWithMatchingImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage.toObject(message.pagesWithMatchingImages[j], options);
                            }
                            if (message.visuallySimilarImages && message.visuallySimilarImages.length) {
                                object.visuallySimilarImages = [];
                                for (var j = 0; j < message.visuallySimilarImages.length; ++j)
                                    object.visuallySimilarImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.toObject(message.visuallySimilarImages[j], options);
                            }
                            if (message.bestGuessLabels && message.bestGuessLabels.length) {
                                object.bestGuessLabels = [];
                                for (var j = 0; j < message.bestGuessLabels.length; ++j)
                                    object.bestGuessLabels[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.toObject(message.bestGuessLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this WebDetection to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetection.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetection
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p3beta1.WebDetection
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetection";
                        };
    
                        WebDetection.WebEntity = (function() {
    
                            /**
                             * Properties of a WebEntity.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @interface IWebEntity
                             * @property {string|null} [entityId] WebEntity entityId
                             * @property {number|null} [score] WebEntity score
                             * @property {string|null} [description] WebEntity description
                             */
    
                            /**
                             * Constructs a new WebEntity.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @classdesc Represents a WebEntity.
                             * @implements IWebEntity
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             */
                            function WebEntity(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebEntity entityId.
                             * @member {string} entityId
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.entityId = "";
    
                            /**
                             * WebEntity score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.score = 0;
    
                            /**
                             * WebEntity description.
                             * @member {string} description
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.description = "";
    
                            /**
                             * Creates a new WebEntity instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebEntity} WebEntity instance
                             */
                            WebEntity.create = function create(properties) {
                                return new WebEntity(properties);
                            };
    
                            /**
                             * Encodes the specified WebEntity message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityId);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebEntity message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.entityId = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.description = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebEntity message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebEntity.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    if (!$util.isString(message.entityId))
                                        return "entityId: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.description != null && message.hasOwnProperty("description"))
                                    if (!$util.isString(message.description))
                                        return "description: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebEntity message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebEntity} WebEntity
                             */
                            WebEntity.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebEntity();
                                if (object.entityId != null)
                                    message.entityId = String(object.entityId);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.description != null)
                                    message.description = String(object.description);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebEntity message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.WebEntity} message WebEntity
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebEntity.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.entityId = "";
                                    object.score = 0;
                                    object.description = "";
                                }
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    object.entityId = message.entityId;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.description != null && message.hasOwnProperty("description"))
                                    object.description = message.description;
                                return object;
                            };
    
                            /**
                             * Converts this WebEntity to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebEntity.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebEntity
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebEntity
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetection.WebEntity";
                            };
    
                            return WebEntity;
                        })();
    
                        WebDetection.WebImage = (function() {
    
                            /**
                             * Properties of a WebImage.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @interface IWebImage
                             * @property {string|null} [url] WebImage url
                             * @property {number|null} [score] WebImage score
                             */
    
                            /**
                             * Constructs a new WebImage.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @classdesc Represents a WebImage.
                             * @implements IWebImage
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebImage=} [properties] Properties to set
                             */
                            function WebImage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebImage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.url = "";
    
                            /**
                             * WebImage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.score = 0;
    
                            /**
                             * Creates a new WebImage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebImage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebImage} WebImage instance
                             */
                            WebImage.create = function create(properties) {
                                return new WebImage(properties);
                            };
    
                            /**
                             * Encodes the specified WebImage message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebImage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebImage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebImage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebImage} WebImage
                             */
                            WebImage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebImage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.WebImage} message WebImage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebImage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this WebImage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebImage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebImage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebImage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetection.WebImage";
                            };
    
                            return WebImage;
                        })();
    
                        WebDetection.WebPage = (function() {
    
                            /**
                             * Properties of a WebPage.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @interface IWebPage
                             * @property {string|null} [url] WebPage url
                             * @property {number|null} [score] WebPage score
                             * @property {string|null} [pageTitle] WebPage pageTitle
                             * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebPage fullMatchingImages
                             * @property {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebPage partialMatchingImages
                             */
    
                            /**
                             * Constructs a new WebPage.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @classdesc Represents a WebPage.
                             * @implements IWebPage
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebPage=} [properties] Properties to set
                             */
                            function WebPage(properties) {
                                this.fullMatchingImages = [];
                                this.partialMatchingImages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebPage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.url = "";
    
                            /**
                             * WebPage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.score = 0;
    
                            /**
                             * WebPage pageTitle.
                             * @member {string} pageTitle
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.pageTitle = "";
    
                            /**
                             * WebPage fullMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>} fullMatchingImages
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.fullMatchingImages = $util.emptyArray;
    
                            /**
                             * WebPage partialMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p3beta1.WebDetection.IWebImage>} partialMatchingImages
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.partialMatchingImages = $util.emptyArray;
    
                            /**
                             * Creates a new WebPage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebPage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebPage} WebPage instance
                             */
                            WebPage.create = function create(properties) {
                                return new WebPage(properties);
                            };
    
                            /**
                             * Encodes the specified WebPage message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.pageTitle != null && Object.hasOwnProperty.call(message, "pageTitle"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageTitle);
                                if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebPage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.pageTitle = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                                message.fullMatchingImages = [];
                                            message.fullMatchingImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 5: {
                                            if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                                message.partialMatchingImages = [];
                                            message.partialMatchingImages.push($root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebPage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebPage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    if (!$util.isString(message.pageTitle))
                                        return "pageTitle: string expected";
                                if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                    if (!Array.isArray(message.fullMatchingImages))
                                        return "fullMatchingImages: array expected";
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                        if (error)
                                            return "fullMatchingImages." + error;
                                    }
                                }
                                if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                    if (!Array.isArray(message.partialMatchingImages))
                                        return "partialMatchingImages: array expected";
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                        if (error)
                                            return "partialMatchingImages." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a WebPage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebPage} WebPage
                             */
                            WebPage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebPage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.pageTitle != null)
                                    message.pageTitle = String(object.pageTitle);
                                if (object.fullMatchingImages) {
                                    if (!Array.isArray(object.fullMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.WebPage.fullMatchingImages: array expected");
                                    message.fullMatchingImages = [];
                                    for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                        if (typeof object.fullMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.WebPage.fullMatchingImages: object expected");
                                        message.fullMatchingImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                    }
                                }
                                if (object.partialMatchingImages) {
                                    if (!Array.isArray(object.partialMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.WebPage.partialMatchingImages: array expected");
                                    message.partialMatchingImages = [];
                                    for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                        if (typeof object.partialMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p3beta1.WebDetection.WebPage.partialMatchingImages: object expected");
                                        message.partialMatchingImages[i] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebPage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.WebPage} message WebPage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebPage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.fullMatchingImages = [];
                                    object.partialMatchingImages = [];
                                }
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                    object.pageTitle = "";
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    object.pageTitle = message.pageTitle;
                                if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                    object.fullMatchingImages = [];
                                    for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                        object.fullMatchingImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                                }
                                if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                    object.partialMatchingImages = [];
                                    for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                        object.partialMatchingImages[j] = $root.google.cloud.vision.v1p3beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this WebPage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebPage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebPage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebPage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebPage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetection.WebPage";
                            };
    
                            return WebPage;
                        })();
    
                        WebDetection.WebLabel = (function() {
    
                            /**
                             * Properties of a WebLabel.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @interface IWebLabel
                             * @property {string|null} [label] WebLabel label
                             * @property {string|null} [languageCode] WebLabel languageCode
                             */
    
                            /**
                             * Constructs a new WebLabel.
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection
                             * @classdesc Represents a WebLabel.
                             * @implements IWebLabel
                             * @constructor
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             */
                            function WebLabel(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebLabel label.
                             * @member {string} label
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.label = "";
    
                            /**
                             * WebLabel languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.languageCode = "";
    
                            /**
                             * Creates a new WebLabel instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebLabel} WebLabel instance
                             */
                            WebLabel.create = function create(properties) {
                                return new WebLabel(properties);
                            };
    
                            /**
                             * Encodes the specified WebLabel message. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebLabel message, length delimited. Does not implicitly {@link google.cloud.vision.v1p3beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.label = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebLabel message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebLabel.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.label != null && message.hasOwnProperty("label"))
                                    if (!$util.isString(message.label))
                                        return "label: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebLabel message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p3beta1.WebDetection.WebLabel} WebLabel
                             */
                            WebLabel.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p3beta1.WebDetection.WebLabel();
                                if (object.label != null)
                                    message.label = String(object.label);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebLabel message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p3beta1.WebDetection.WebLabel} message WebLabel
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebLabel.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.label = "";
                                    object.languageCode = "";
                                }
                                if (message.label != null && message.hasOwnProperty("label"))
                                    object.label = message.label;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                return object;
                            };
    
                            /**
                             * Converts this WebLabel to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebLabel.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebLabel
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p3beta1.WebDetection.WebLabel
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p3beta1.WebDetection.WebLabel";
                            };
    
                            return WebLabel;
                        })();
    
                        return WebDetection;
                    })();
    
                    return v1p3beta1;
                })();
    
                vision.v1p4beta1 = (function() {
    
                    /**
                     * Namespace v1p4beta1.
                     * @memberof google.cloud.vision
                     * @namespace
                     */
                    var v1p4beta1 = {};
    
                    v1p4beta1.FaceRecognitionParams = (function() {
    
                        /**
                         * Properties of a FaceRecognitionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IFaceRecognitionParams
                         * @property {Array.<string>|null} [celebritySet] FaceRecognitionParams celebritySet
                         */
    
                        /**
                         * Constructs a new FaceRecognitionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a FaceRecognitionParams.
                         * @implements IFaceRecognitionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionParams=} [properties] Properties to set
                         */
                        function FaceRecognitionParams(properties) {
                            this.celebritySet = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceRecognitionParams celebritySet.
                         * @member {Array.<string>} celebritySet
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @instance
                         */
                        FaceRecognitionParams.prototype.celebritySet = $util.emptyArray;
    
                        /**
                         * Creates a new FaceRecognitionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionParams} FaceRecognitionParams instance
                         */
                        FaceRecognitionParams.create = function create(properties) {
                            return new FaceRecognitionParams(properties);
                        };
    
                        /**
                         * Encodes the specified FaceRecognitionParams message. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceRecognitionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionParams} message FaceRecognitionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceRecognitionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.celebritySet != null && message.celebritySet.length)
                                for (var i = 0; i < message.celebritySet.length; ++i)
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.celebritySet[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceRecognitionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceRecognitionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionParams} message FaceRecognitionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceRecognitionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceRecognitionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionParams} FaceRecognitionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceRecognitionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.celebritySet && message.celebritySet.length))
                                            message.celebritySet = [];
                                        message.celebritySet.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceRecognitionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionParams} FaceRecognitionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceRecognitionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceRecognitionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceRecognitionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.celebritySet != null && message.hasOwnProperty("celebritySet")) {
                                if (!Array.isArray(message.celebritySet))
                                    return "celebritySet: array expected";
                                for (var i = 0; i < message.celebritySet.length; ++i)
                                    if (!$util.isString(message.celebritySet[i]))
                                        return "celebritySet: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a FaceRecognitionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionParams} FaceRecognitionParams
                         */
                        FaceRecognitionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams();
                            if (object.celebritySet) {
                                if (!Array.isArray(object.celebritySet))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceRecognitionParams.celebritySet: array expected");
                                message.celebritySet = [];
                                for (var i = 0; i < object.celebritySet.length; ++i)
                                    message.celebritySet[i] = String(object.celebritySet[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceRecognitionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.FaceRecognitionParams} message FaceRecognitionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceRecognitionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.celebritySet = [];
                            if (message.celebritySet && message.celebritySet.length) {
                                object.celebritySet = [];
                                for (var j = 0; j < message.celebritySet.length; ++j)
                                    object.celebritySet[j] = message.celebritySet[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this FaceRecognitionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceRecognitionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceRecognitionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceRecognitionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.FaceRecognitionParams";
                        };
    
                        return FaceRecognitionParams;
                    })();
    
                    v1p4beta1.Celebrity = (function() {
    
                        /**
                         * Properties of a Celebrity.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICelebrity
                         * @property {string|null} [name] Celebrity name
                         * @property {string|null} [displayName] Celebrity displayName
                         * @property {string|null} [description] Celebrity description
                         */
    
                        /**
                         * Constructs a new Celebrity.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Celebrity.
                         * @implements ICelebrity
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICelebrity=} [properties] Properties to set
                         */
                        function Celebrity(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Celebrity name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @instance
                         */
                        Celebrity.prototype.name = "";
    
                        /**
                         * Celebrity displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @instance
                         */
                        Celebrity.prototype.displayName = "";
    
                        /**
                         * Celebrity description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @instance
                         */
                        Celebrity.prototype.description = "";
    
                        /**
                         * Creates a new Celebrity instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICelebrity=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Celebrity} Celebrity instance
                         */
                        Celebrity.create = function create(properties) {
                            return new Celebrity(properties);
                        };
    
                        /**
                         * Encodes the specified Celebrity message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Celebrity.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICelebrity} message Celebrity message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Celebrity.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Celebrity message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Celebrity.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICelebrity} message Celebrity message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Celebrity.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Celebrity message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Celebrity} Celebrity
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Celebrity.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Celebrity();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Celebrity message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Celebrity} Celebrity
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Celebrity.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Celebrity message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Celebrity.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Celebrity message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Celebrity} Celebrity
                         */
                        Celebrity.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Celebrity)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Celebrity();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.description != null)
                                message.description = String(object.description);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Celebrity message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Celebrity} message Celebrity
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Celebrity.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.description = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            return object;
                        };
    
                        /**
                         * Converts this Celebrity to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Celebrity.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Celebrity
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Celebrity
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Celebrity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Celebrity";
                        };
    
                        return Celebrity;
                    })();
    
                    v1p4beta1.FaceRecognitionResult = (function() {
    
                        /**
                         * Properties of a FaceRecognitionResult.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IFaceRecognitionResult
                         * @property {google.cloud.vision.v1p4beta1.ICelebrity|null} [celebrity] FaceRecognitionResult celebrity
                         * @property {number|null} [confidence] FaceRecognitionResult confidence
                         */
    
                        /**
                         * Constructs a new FaceRecognitionResult.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a FaceRecognitionResult.
                         * @implements IFaceRecognitionResult
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionResult=} [properties] Properties to set
                         */
                        function FaceRecognitionResult(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceRecognitionResult celebrity.
                         * @member {google.cloud.vision.v1p4beta1.ICelebrity|null|undefined} celebrity
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @instance
                         */
                        FaceRecognitionResult.prototype.celebrity = null;
    
                        /**
                         * FaceRecognitionResult confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @instance
                         */
                        FaceRecognitionResult.prototype.confidence = 0;
    
                        /**
                         * Creates a new FaceRecognitionResult instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionResult=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionResult} FaceRecognitionResult instance
                         */
                        FaceRecognitionResult.create = function create(properties) {
                            return new FaceRecognitionResult(properties);
                        };
    
                        /**
                         * Encodes the specified FaceRecognitionResult message. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceRecognitionResult.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionResult} message FaceRecognitionResult message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceRecognitionResult.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.celebrity != null && Object.hasOwnProperty.call(message, "celebrity"))
                                $root.google.cloud.vision.v1p4beta1.Celebrity.encode(message.celebrity, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceRecognitionResult message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceRecognitionResult.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceRecognitionResult} message FaceRecognitionResult message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceRecognitionResult.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceRecognitionResult message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionResult} FaceRecognitionResult
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceRecognitionResult.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.celebrity = $root.google.cloud.vision.v1p4beta1.Celebrity.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceRecognitionResult message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionResult} FaceRecognitionResult
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceRecognitionResult.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceRecognitionResult message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceRecognitionResult.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.celebrity != null && message.hasOwnProperty("celebrity")) {
                                var error = $root.google.cloud.vision.v1p4beta1.Celebrity.verify(message.celebrity);
                                if (error)
                                    return "celebrity." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a FaceRecognitionResult message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.FaceRecognitionResult} FaceRecognitionResult
                         */
                        FaceRecognitionResult.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult();
                            if (object.celebrity != null) {
                                if (typeof object.celebrity !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceRecognitionResult.celebrity: object expected");
                                message.celebrity = $root.google.cloud.vision.v1p4beta1.Celebrity.fromObject(object.celebrity);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceRecognitionResult message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.FaceRecognitionResult} message FaceRecognitionResult
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceRecognitionResult.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.celebrity = null;
                                object.confidence = 0;
                            }
                            if (message.celebrity != null && message.hasOwnProperty("celebrity"))
                                object.celebrity = $root.google.cloud.vision.v1p4beta1.Celebrity.toObject(message.celebrity, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this FaceRecognitionResult to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceRecognitionResult.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceRecognitionResult
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.FaceRecognitionResult
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceRecognitionResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.FaceRecognitionResult";
                        };
    
                        return FaceRecognitionResult;
                    })();
    
                    v1p4beta1.Vertex = (function() {
    
                        /**
                         * Properties of a Vertex.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IVertex
                         * @property {number|null} [x] Vertex x
                         * @property {number|null} [y] Vertex y
                         */
    
                        /**
                         * Constructs a new Vertex.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Vertex.
                         * @implements IVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IVertex=} [properties] Properties to set
                         */
                        function Vertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Vertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.x = 0;
    
                        /**
                         * Vertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @instance
                         */
                        Vertex.prototype.y = 0;
    
                        /**
                         * Creates a new Vertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Vertex} Vertex instance
                         */
                        Vertex.create = function create(properties) {
                            return new Vertex(properties);
                        };
    
                        /**
                         * Encodes the specified Vertex message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Vertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Vertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Vertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IVertex} message Vertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Vertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Vertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Vertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Vertex} Vertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Vertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Vertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Vertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (!$util.isInteger(message.x))
                                    return "x: integer expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (!$util.isInteger(message.y))
                                    return "y: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates a Vertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Vertex} Vertex
                         */
                        Vertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Vertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Vertex();
                            if (object.x != null)
                                message.x = object.x | 0;
                            if (object.y != null)
                                message.y = object.y | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Vertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Vertex} message Vertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Vertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = message.y;
                            return object;
                        };
    
                        /**
                         * Converts this Vertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Vertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Vertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Vertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Vertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Vertex";
                        };
    
                        return Vertex;
                    })();
    
                    v1p4beta1.NormalizedVertex = (function() {
    
                        /**
                         * Properties of a NormalizedVertex.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface INormalizedVertex
                         * @property {number|null} [x] NormalizedVertex x
                         * @property {number|null} [y] NormalizedVertex y
                         */
    
                        /**
                         * Constructs a new NormalizedVertex.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a NormalizedVertex.
                         * @implements INormalizedVertex
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.INormalizedVertex=} [properties] Properties to set
                         */
                        function NormalizedVertex(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * NormalizedVertex x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.x = 0;
    
                        /**
                         * NormalizedVertex y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @instance
                         */
                        NormalizedVertex.prototype.y = 0;
    
                        /**
                         * Creates a new NormalizedVertex instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.INormalizedVertex=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.NormalizedVertex} NormalizedVertex instance
                         */
                        NormalizedVertex.create = function create(properties) {
                            return new NormalizedVertex(properties);
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message. Does not implicitly {@link google.cloud.vision.v1p4beta1.NormalizedVertex.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified NormalizedVertex message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.NormalizedVertex.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.INormalizedVertex} message NormalizedVertex message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        NormalizedVertex.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.NormalizedVertex();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a NormalizedVertex message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.NormalizedVertex} NormalizedVertex
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        NormalizedVertex.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a NormalizedVertex message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        NormalizedVertex.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a NormalizedVertex message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.NormalizedVertex} NormalizedVertex
                         */
                        NormalizedVertex.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.NormalizedVertex)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.NormalizedVertex();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a NormalizedVertex message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.NormalizedVertex} message NormalizedVertex
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        NormalizedVertex.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            return object;
                        };
    
                        /**
                         * Converts this NormalizedVertex to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        NormalizedVertex.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for NormalizedVertex
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.NormalizedVertex
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        NormalizedVertex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.NormalizedVertex";
                        };
    
                        return NormalizedVertex;
                    })();
    
                    v1p4beta1.BoundingPoly = (function() {
    
                        /**
                         * Properties of a BoundingPoly.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p4beta1.IVertex>|null} [vertices] BoundingPoly vertices
                         * @property {Array.<google.cloud.vision.v1p4beta1.INormalizedVertex>|null} [normalizedVertices] BoundingPoly normalizedVertices
                         */
    
                        /**
                         * Constructs a new BoundingPoly.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BoundingPoly.
                         * @implements IBoundingPoly
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBoundingPoly=} [properties] Properties to set
                         */
                        function BoundingPoly(properties) {
                            this.vertices = [];
                            this.normalizedVertices = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BoundingPoly vertices.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IVertex>} vertices
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.vertices = $util.emptyArray;
    
                        /**
                         * BoundingPoly normalizedVertices.
                         * @member {Array.<google.cloud.vision.v1p4beta1.INormalizedVertex>} normalizedVertices
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @instance
                         */
                        BoundingPoly.prototype.normalizedVertices = $util.emptyArray;
    
                        /**
                         * Creates a new BoundingPoly instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBoundingPoly=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BoundingPoly} BoundingPoly instance
                         */
                        BoundingPoly.create = function create(properties) {
                            return new BoundingPoly(properties);
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BoundingPoly.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.vertices != null && message.vertices.length)
                                for (var i = 0; i < message.vertices.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Vertex.encode(message.vertices[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.normalizedVertices != null && message.normalizedVertices.length)
                                for (var i = 0; i < message.normalizedVertices.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.NormalizedVertex.encode(message.normalizedVertices[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BoundingPoly message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BoundingPoly.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBoundingPoly} message BoundingPoly message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BoundingPoly.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BoundingPoly();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.vertices && message.vertices.length))
                                            message.vertices = [];
                                        message.vertices.push($root.google.cloud.vision.v1p4beta1.Vertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.normalizedVertices && message.normalizedVertices.length))
                                            message.normalizedVertices = [];
                                        message.normalizedVertices.push($root.google.cloud.vision.v1p4beta1.NormalizedVertex.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BoundingPoly message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BoundingPoly} BoundingPoly
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BoundingPoly.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BoundingPoly message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BoundingPoly.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.vertices != null && message.hasOwnProperty("vertices")) {
                                if (!Array.isArray(message.vertices))
                                    return "vertices: array expected";
                                for (var i = 0; i < message.vertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Vertex.verify(message.vertices[i]);
                                    if (error)
                                        return "vertices." + error;
                                }
                            }
                            if (message.normalizedVertices != null && message.hasOwnProperty("normalizedVertices")) {
                                if (!Array.isArray(message.normalizedVertices))
                                    return "normalizedVertices: array expected";
                                for (var i = 0; i < message.normalizedVertices.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.NormalizedVertex.verify(message.normalizedVertices[i]);
                                    if (error)
                                        return "normalizedVertices." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BoundingPoly message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BoundingPoly} BoundingPoly
                         */
                        BoundingPoly.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BoundingPoly)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BoundingPoly();
                            if (object.vertices) {
                                if (!Array.isArray(object.vertices))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BoundingPoly.vertices: array expected");
                                message.vertices = [];
                                for (var i = 0; i < object.vertices.length; ++i) {
                                    if (typeof object.vertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BoundingPoly.vertices: object expected");
                                    message.vertices[i] = $root.google.cloud.vision.v1p4beta1.Vertex.fromObject(object.vertices[i]);
                                }
                            }
                            if (object.normalizedVertices) {
                                if (!Array.isArray(object.normalizedVertices))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BoundingPoly.normalizedVertices: array expected");
                                message.normalizedVertices = [];
                                for (var i = 0; i < object.normalizedVertices.length; ++i) {
                                    if (typeof object.normalizedVertices[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BoundingPoly.normalizedVertices: object expected");
                                    message.normalizedVertices[i] = $root.google.cloud.vision.v1p4beta1.NormalizedVertex.fromObject(object.normalizedVertices[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BoundingPoly message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BoundingPoly} message BoundingPoly
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BoundingPoly.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.vertices = [];
                                object.normalizedVertices = [];
                            }
                            if (message.vertices && message.vertices.length) {
                                object.vertices = [];
                                for (var j = 0; j < message.vertices.length; ++j)
                                    object.vertices[j] = $root.google.cloud.vision.v1p4beta1.Vertex.toObject(message.vertices[j], options);
                            }
                            if (message.normalizedVertices && message.normalizedVertices.length) {
                                object.normalizedVertices = [];
                                for (var j = 0; j < message.normalizedVertices.length; ++j)
                                    object.normalizedVertices[j] = $root.google.cloud.vision.v1p4beta1.NormalizedVertex.toObject(message.normalizedVertices[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BoundingPoly to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BoundingPoly.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BoundingPoly
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BoundingPoly
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BoundingPoly.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BoundingPoly";
                        };
    
                        return BoundingPoly;
                    })();
    
                    v1p4beta1.Position = (function() {
    
                        /**
                         * Properties of a Position.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IPosition
                         * @property {number|null} [x] Position x
                         * @property {number|null} [y] Position y
                         * @property {number|null} [z] Position z
                         */
    
                        /**
                         * Constructs a new Position.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Position.
                         * @implements IPosition
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IPosition=} [properties] Properties to set
                         */
                        function Position(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Position x.
                         * @member {number} x
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @instance
                         */
                        Position.prototype.x = 0;
    
                        /**
                         * Position y.
                         * @member {number} y
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @instance
                         */
                        Position.prototype.y = 0;
    
                        /**
                         * Position z.
                         * @member {number} z
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @instance
                         */
                        Position.prototype.z = 0;
    
                        /**
                         * Creates a new Position instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPosition=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Position} Position instance
                         */
                        Position.create = function create(properties) {
                            return new Position(properties);
                        };
    
                        /**
                         * Encodes the specified Position message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Position.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.x != null && Object.hasOwnProperty.call(message, "x"))
                                writer.uint32(/* id 1, wireType 5 =*/13).float(message.x);
                            if (message.y != null && Object.hasOwnProperty.call(message, "y"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.y);
                            if (message.z != null && Object.hasOwnProperty.call(message, "z"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.z);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Position message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Position.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPosition} message Position message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Position.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Position();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.x = reader.float();
                                        break;
                                    }
                                case 2: {
                                        message.y = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.z = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Position message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Position} Position
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Position.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Position message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Position.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.x != null && message.hasOwnProperty("x"))
                                if (typeof message.x !== "number")
                                    return "x: number expected";
                            if (message.y != null && message.hasOwnProperty("y"))
                                if (typeof message.y !== "number")
                                    return "y: number expected";
                            if (message.z != null && message.hasOwnProperty("z"))
                                if (typeof message.z !== "number")
                                    return "z: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Position message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Position} Position
                         */
                        Position.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Position)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Position();
                            if (object.x != null)
                                message.x = Number(object.x);
                            if (object.y != null)
                                message.y = Number(object.y);
                            if (object.z != null)
                                message.z = Number(object.z);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Position message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Position} message Position
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Position.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.x = 0;
                                object.y = 0;
                                object.z = 0;
                            }
                            if (message.x != null && message.hasOwnProperty("x"))
                                object.x = options.json && !isFinite(message.x) ? String(message.x) : message.x;
                            if (message.y != null && message.hasOwnProperty("y"))
                                object.y = options.json && !isFinite(message.y) ? String(message.y) : message.y;
                            if (message.z != null && message.hasOwnProperty("z"))
                                object.z = options.json && !isFinite(message.z) ? String(message.z) : message.z;
                            return object;
                        };
    
                        /**
                         * Converts this Position to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Position.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Position
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Position
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Position.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Position";
                        };
    
                        return Position;
                    })();
    
                    v1p4beta1.ImageAnnotator = (function() {
    
                        /**
                         * Constructs a new ImageAnnotator service.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImageAnnotator
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ImageAnnotator(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ImageAnnotator.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ImageAnnotator;
    
                        /**
                         * Creates new ImageAnnotator service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ImageAnnotator} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ImageAnnotator.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ImageAnnotator|batchAnnotateImages}.
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @typedef BatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} [response] BatchAnnotateImagesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateImages = function batchAnnotateImages(request, callback) {
                            return this.rpcCall(batchAnnotateImages, $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest, $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateImages" });
    
                        /**
                         * Calls BatchAnnotateImages.
                         * @function batchAnnotateImages
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest} request BatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ImageAnnotator|batchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @typedef BatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} [response] BatchAnnotateFilesResponse
                         */
    
                        /**
                         * Calls BatchAnnotateFiles.
                         * @function batchAnnotateFiles
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest} request BatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ImageAnnotator.BatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and BatchAnnotateFilesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.batchAnnotateFiles = function batchAnnotateFiles(request, callback) {
                            return this.rpcCall(batchAnnotateFiles, $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest, $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse, request, callback);
                        }, "name", { value: "BatchAnnotateFiles" });
    
                        /**
                         * Calls BatchAnnotateFiles.
                         * @function batchAnnotateFiles
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest} request BatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ImageAnnotator|asyncBatchAnnotateImages}.
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateImages.
                         * @function asyncBatchAnnotateImages
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest} request AsyncBatchAnnotateImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateImagesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateImages = function asyncBatchAnnotateImages(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateImages, $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateImages" });
    
                        /**
                         * Calls AsyncBatchAnnotateImages.
                         * @function asyncBatchAnnotateImages
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest} request AsyncBatchAnnotateImagesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ImageAnnotator|asyncBatchAnnotateFiles}.
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @typedef AsyncBatchAnnotateFilesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ImageAnnotator.AsyncBatchAnnotateFilesCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ImageAnnotator.prototype.asyncBatchAnnotateFiles = function asyncBatchAnnotateFiles(request, callback) {
                            return this.rpcCall(asyncBatchAnnotateFiles, $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "AsyncBatchAnnotateFiles" });
    
                        /**
                         * Calls AsyncBatchAnnotateFiles.
                         * @function asyncBatchAnnotateFiles
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotator
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest} request AsyncBatchAnnotateFilesRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ImageAnnotator;
                    })();
    
                    v1p4beta1.Feature = (function() {
    
                        /**
                         * Properties of a Feature.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IFeature
                         * @property {google.cloud.vision.v1p4beta1.Feature.Type|null} [type] Feature type
                         * @property {number|null} [maxResults] Feature maxResults
                         * @property {string|null} [model] Feature model
                         */
    
                        /**
                         * Constructs a new Feature.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Feature.
                         * @implements IFeature
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IFeature=} [properties] Properties to set
                         */
                        function Feature(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Feature type.
                         * @member {google.cloud.vision.v1p4beta1.Feature.Type} type
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @instance
                         */
                        Feature.prototype.type = 0;
    
                        /**
                         * Feature maxResults.
                         * @member {number} maxResults
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @instance
                         */
                        Feature.prototype.maxResults = 0;
    
                        /**
                         * Feature model.
                         * @member {string} model
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @instance
                         */
                        Feature.prototype.model = "";
    
                        /**
                         * Creates a new Feature instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFeature=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Feature} Feature instance
                         */
                        Feature.create = function create(properties) {
                            return new Feature(properties);
                        };
    
                        /**
                         * Encodes the specified Feature message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Feature.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                            if (message.maxResults != null && Object.hasOwnProperty.call(message, "maxResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.maxResults);
                            if (message.model != null && Object.hasOwnProperty.call(message, "model"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.model);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Feature message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Feature.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFeature} message Feature message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Feature.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Feature();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.type = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.maxResults = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.model = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Feature message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Feature} Feature
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Feature.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Feature message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Feature.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.type != null && message.hasOwnProperty("type"))
                                switch (message.type) {
                                default:
                                    return "type: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                case 11:
                                case 6:
                                case 7:
                                case 9:
                                case 10:
                                case 12:
                                case 19:
                                    break;
                                }
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                if (!$util.isInteger(message.maxResults))
                                    return "maxResults: integer expected";
                            if (message.model != null && message.hasOwnProperty("model"))
                                if (!$util.isString(message.model))
                                    return "model: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a Feature message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Feature} Feature
                         */
                        Feature.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Feature)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Feature();
                            switch (object.type) {
                            default:
                                if (typeof object.type === "number") {
                                    message.type = object.type;
                                    break;
                                }
                                break;
                            case "TYPE_UNSPECIFIED":
                            case 0:
                                message.type = 0;
                                break;
                            case "FACE_DETECTION":
                            case 1:
                                message.type = 1;
                                break;
                            case "LANDMARK_DETECTION":
                            case 2:
                                message.type = 2;
                                break;
                            case "LOGO_DETECTION":
                            case 3:
                                message.type = 3;
                                break;
                            case "LABEL_DETECTION":
                            case 4:
                                message.type = 4;
                                break;
                            case "TEXT_DETECTION":
                            case 5:
                                message.type = 5;
                                break;
                            case "DOCUMENT_TEXT_DETECTION":
                            case 11:
                                message.type = 11;
                                break;
                            case "SAFE_SEARCH_DETECTION":
                            case 6:
                                message.type = 6;
                                break;
                            case "IMAGE_PROPERTIES":
                            case 7:
                                message.type = 7;
                                break;
                            case "CROP_HINTS":
                            case 9:
                                message.type = 9;
                                break;
                            case "WEB_DETECTION":
                            case 10:
                                message.type = 10;
                                break;
                            case "PRODUCT_SEARCH":
                            case 12:
                                message.type = 12;
                                break;
                            case "OBJECT_LOCALIZATION":
                            case 19:
                                message.type = 19;
                                break;
                            }
                            if (object.maxResults != null)
                                message.maxResults = object.maxResults | 0;
                            if (object.model != null)
                                message.model = String(object.model);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Feature message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Feature} message Feature
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Feature.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0;
                                object.maxResults = 0;
                                object.model = "";
                            }
                            if (message.type != null && message.hasOwnProperty("type"))
                                object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Feature.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.Feature.Type[message.type] : message.type;
                            if (message.maxResults != null && message.hasOwnProperty("maxResults"))
                                object.maxResults = message.maxResults;
                            if (message.model != null && message.hasOwnProperty("model"))
                                object.model = message.model;
                            return object;
                        };
    
                        /**
                         * Converts this Feature to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Feature.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Feature
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Feature
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Feature.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Feature";
                        };
    
                        /**
                         * Type enum.
                         * @name google.cloud.vision.v1p4beta1.Feature.Type
                         * @enum {number}
                         * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value
                         * @property {number} FACE_DETECTION=1 FACE_DETECTION value
                         * @property {number} LANDMARK_DETECTION=2 LANDMARK_DETECTION value
                         * @property {number} LOGO_DETECTION=3 LOGO_DETECTION value
                         * @property {number} LABEL_DETECTION=4 LABEL_DETECTION value
                         * @property {number} TEXT_DETECTION=5 TEXT_DETECTION value
                         * @property {number} DOCUMENT_TEXT_DETECTION=11 DOCUMENT_TEXT_DETECTION value
                         * @property {number} SAFE_SEARCH_DETECTION=6 SAFE_SEARCH_DETECTION value
                         * @property {number} IMAGE_PROPERTIES=7 IMAGE_PROPERTIES value
                         * @property {number} CROP_HINTS=9 CROP_HINTS value
                         * @property {number} WEB_DETECTION=10 WEB_DETECTION value
                         * @property {number} PRODUCT_SEARCH=12 PRODUCT_SEARCH value
                         * @property {number} OBJECT_LOCALIZATION=19 OBJECT_LOCALIZATION value
                         */
                        Feature.Type = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "FACE_DETECTION"] = 1;
                            values[valuesById[2] = "LANDMARK_DETECTION"] = 2;
                            values[valuesById[3] = "LOGO_DETECTION"] = 3;
                            values[valuesById[4] = "LABEL_DETECTION"] = 4;
                            values[valuesById[5] = "TEXT_DETECTION"] = 5;
                            values[valuesById[11] = "DOCUMENT_TEXT_DETECTION"] = 11;
                            values[valuesById[6] = "SAFE_SEARCH_DETECTION"] = 6;
                            values[valuesById[7] = "IMAGE_PROPERTIES"] = 7;
                            values[valuesById[9] = "CROP_HINTS"] = 9;
                            values[valuesById[10] = "WEB_DETECTION"] = 10;
                            values[valuesById[12] = "PRODUCT_SEARCH"] = 12;
                            values[valuesById[19] = "OBJECT_LOCALIZATION"] = 19;
                            return values;
                        })();
    
                        return Feature;
                    })();
    
                    v1p4beta1.ImageSource = (function() {
    
                        /**
                         * Properties of an ImageSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImageSource
                         * @property {string|null} [gcsImageUri] ImageSource gcsImageUri
                         * @property {string|null} [imageUri] ImageSource imageUri
                         */
    
                        /**
                         * Constructs a new ImageSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImageSource.
                         * @implements IImageSource
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImageSource=} [properties] Properties to set
                         */
                        function ImageSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageSource gcsImageUri.
                         * @member {string} gcsImageUri
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.gcsImageUri = "";
    
                        /**
                         * ImageSource imageUri.
                         * @member {string} imageUri
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @instance
                         */
                        ImageSource.prototype.imageUri = "";
    
                        /**
                         * Creates a new ImageSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImageSource} ImageSource instance
                         */
                        ImageSource.create = function create(properties) {
                            return new ImageSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImageSource message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsImageUri != null && Object.hasOwnProperty.call(message, "gcsImageUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.gcsImageUri);
                            if (message.imageUri != null && Object.hasOwnProperty.call(message, "imageUri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.imageUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageSource} message ImageSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImageSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsImageUri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.imageUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImageSource} ImageSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                if (!$util.isString(message.gcsImageUri))
                                    return "gcsImageUri: string expected";
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                if (!$util.isString(message.imageUri))
                                    return "imageUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImageSource} ImageSource
                         */
                        ImageSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImageSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImageSource();
                            if (object.gcsImageUri != null)
                                message.gcsImageUri = String(object.gcsImageUri);
                            if (object.imageUri != null)
                                message.imageUri = String(object.imageUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImageSource} message ImageSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsImageUri = "";
                                object.imageUri = "";
                            }
                            if (message.gcsImageUri != null && message.hasOwnProperty("gcsImageUri"))
                                object.gcsImageUri = message.gcsImageUri;
                            if (message.imageUri != null && message.hasOwnProperty("imageUri"))
                                object.imageUri = message.imageUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImageSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImageSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImageSource";
                        };
    
                        return ImageSource;
                    })();
    
                    v1p4beta1.Image = (function() {
    
                        /**
                         * Properties of an Image.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImage
                         * @property {Uint8Array|null} [content] Image content
                         * @property {google.cloud.vision.v1p4beta1.IImageSource|null} [source] Image source
                         */
    
                        /**
                         * Constructs a new Image.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an Image.
                         * @implements IImage
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImage=} [properties] Properties to set
                         */
                        function Image(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Image content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @instance
                         */
                        Image.prototype.content = $util.newBuffer([]);
    
                        /**
                         * Image source.
                         * @member {google.cloud.vision.v1p4beta1.IImageSource|null|undefined} source
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @instance
                         */
                        Image.prototype.source = null;
    
                        /**
                         * Creates a new Image instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Image} Image instance
                         */
                        Image.create = function create(properties) {
                            return new Image(properties);
                        };
    
                        /**
                         * Encodes the specified Image message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Image.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.content);
                            if (message.source != null && Object.hasOwnProperty.call(message, "source"))
                                $root.google.cloud.vision.v1p4beta1.ImageSource.encode(message.source, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Image message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Image.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImage} message Image message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Image.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Image();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.source = $root.google.cloud.vision.v1p4beta1.ImageSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an Image message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Image} Image
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Image.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an Image message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Image.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.source != null && message.hasOwnProperty("source")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageSource.verify(message.source);
                                if (error)
                                    return "source." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an Image message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Image} Image
                         */
                        Image.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Image)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Image();
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.source != null) {
                                if (typeof object.source !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Image.source: object expected");
                                message.source = $root.google.cloud.vision.v1p4beta1.ImageSource.fromObject(object.source);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an Image message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Image} message Image
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Image.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                                object.source = null;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            if (message.source != null && message.hasOwnProperty("source"))
                                object.source = $root.google.cloud.vision.v1p4beta1.ImageSource.toObject(message.source, options);
                            return object;
                        };
    
                        /**
                         * Converts this Image to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Image.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Image
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Image
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Image.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Image";
                        };
    
                        return Image;
                    })();
    
                    /**
                     * Likelihood enum.
                     * @name google.cloud.vision.v1p4beta1.Likelihood
                     * @enum {number}
                     * @property {number} UNKNOWN=0 UNKNOWN value
                     * @property {number} VERY_UNLIKELY=1 VERY_UNLIKELY value
                     * @property {number} UNLIKELY=2 UNLIKELY value
                     * @property {number} POSSIBLE=3 POSSIBLE value
                     * @property {number} LIKELY=4 LIKELY value
                     * @property {number} VERY_LIKELY=5 VERY_LIKELY value
                     */
                    v1p4beta1.Likelihood = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "UNKNOWN"] = 0;
                        values[valuesById[1] = "VERY_UNLIKELY"] = 1;
                        values[valuesById[2] = "UNLIKELY"] = 2;
                        values[valuesById[3] = "POSSIBLE"] = 3;
                        values[valuesById[4] = "LIKELY"] = 4;
                        values[valuesById[5] = "VERY_LIKELY"] = 5;
                        return values;
                    })();
    
                    v1p4beta1.FaceAnnotation = (function() {
    
                        /**
                         * Properties of a FaceAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IFaceAnnotation
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] FaceAnnotation boundingPoly
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [fdBoundingPoly] FaceAnnotation fdBoundingPoly
                         * @property {Array.<google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark>|null} [landmarks] FaceAnnotation landmarks
                         * @property {number|null} [rollAngle] FaceAnnotation rollAngle
                         * @property {number|null} [panAngle] FaceAnnotation panAngle
                         * @property {number|null} [tiltAngle] FaceAnnotation tiltAngle
                         * @property {number|null} [detectionConfidence] FaceAnnotation detectionConfidence
                         * @property {number|null} [landmarkingConfidence] FaceAnnotation landmarkingConfidence
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [joyLikelihood] FaceAnnotation joyLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [sorrowLikelihood] FaceAnnotation sorrowLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [angerLikelihood] FaceAnnotation angerLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [surpriseLikelihood] FaceAnnotation surpriseLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [underExposedLikelihood] FaceAnnotation underExposedLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [blurredLikelihood] FaceAnnotation blurredLikelihood
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [headwearLikelihood] FaceAnnotation headwearLikelihood
                         * @property {Array.<google.cloud.vision.v1p4beta1.IFaceRecognitionResult>|null} [recognitionResult] FaceAnnotation recognitionResult
                         */
    
                        /**
                         * Constructs a new FaceAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a FaceAnnotation.
                         * @implements IFaceAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IFaceAnnotation=} [properties] Properties to set
                         */
                        function FaceAnnotation(properties) {
                            this.landmarks = [];
                            this.recognitionResult = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * FaceAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * FaceAnnotation fdBoundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} fdBoundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.fdBoundingPoly = null;
    
                        /**
                         * FaceAnnotation landmarks.
                         * @member {Array.<google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark>} landmarks
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarks = $util.emptyArray;
    
                        /**
                         * FaceAnnotation rollAngle.
                         * @member {number} rollAngle
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.rollAngle = 0;
    
                        /**
                         * FaceAnnotation panAngle.
                         * @member {number} panAngle
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.panAngle = 0;
    
                        /**
                         * FaceAnnotation tiltAngle.
                         * @member {number} tiltAngle
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.tiltAngle = 0;
    
                        /**
                         * FaceAnnotation detectionConfidence.
                         * @member {number} detectionConfidence
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.detectionConfidence = 0;
    
                        /**
                         * FaceAnnotation landmarkingConfidence.
                         * @member {number} landmarkingConfidence
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.landmarkingConfidence = 0;
    
                        /**
                         * FaceAnnotation joyLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} joyLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.joyLikelihood = 0;
    
                        /**
                         * FaceAnnotation sorrowLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} sorrowLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.sorrowLikelihood = 0;
    
                        /**
                         * FaceAnnotation angerLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} angerLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.angerLikelihood = 0;
    
                        /**
                         * FaceAnnotation surpriseLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} surpriseLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.surpriseLikelihood = 0;
    
                        /**
                         * FaceAnnotation underExposedLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} underExposedLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.underExposedLikelihood = 0;
    
                        /**
                         * FaceAnnotation blurredLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} blurredLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.blurredLikelihood = 0;
    
                        /**
                         * FaceAnnotation headwearLikelihood.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} headwearLikelihood
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.headwearLikelihood = 0;
    
                        /**
                         * FaceAnnotation recognitionResult.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IFaceRecognitionResult>} recognitionResult
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         */
                        FaceAnnotation.prototype.recognitionResult = $util.emptyArray;
    
                        /**
                         * Creates a new FaceAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation} FaceAnnotation instance
                         */
                        FaceAnnotation.create = function create(properties) {
                            return new FaceAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fdBoundingPoly != null && Object.hasOwnProperty.call(message, "fdBoundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.fdBoundingPoly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.landmarks != null && message.landmarks.length)
                                for (var i = 0; i < message.landmarks.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.encode(message.landmarks[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.rollAngle != null && Object.hasOwnProperty.call(message, "rollAngle"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.rollAngle);
                            if (message.panAngle != null && Object.hasOwnProperty.call(message, "panAngle"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.panAngle);
                            if (message.tiltAngle != null && Object.hasOwnProperty.call(message, "tiltAngle"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.tiltAngle);
                            if (message.detectionConfidence != null && Object.hasOwnProperty.call(message, "detectionConfidence"))
                                writer.uint32(/* id 7, wireType 5 =*/61).float(message.detectionConfidence);
                            if (message.landmarkingConfidence != null && Object.hasOwnProperty.call(message, "landmarkingConfidence"))
                                writer.uint32(/* id 8, wireType 5 =*/69).float(message.landmarkingConfidence);
                            if (message.joyLikelihood != null && Object.hasOwnProperty.call(message, "joyLikelihood"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.joyLikelihood);
                            if (message.sorrowLikelihood != null && Object.hasOwnProperty.call(message, "sorrowLikelihood"))
                                writer.uint32(/* id 10, wireType 0 =*/80).int32(message.sorrowLikelihood);
                            if (message.angerLikelihood != null && Object.hasOwnProperty.call(message, "angerLikelihood"))
                                writer.uint32(/* id 11, wireType 0 =*/88).int32(message.angerLikelihood);
                            if (message.surpriseLikelihood != null && Object.hasOwnProperty.call(message, "surpriseLikelihood"))
                                writer.uint32(/* id 12, wireType 0 =*/96).int32(message.surpriseLikelihood);
                            if (message.underExposedLikelihood != null && Object.hasOwnProperty.call(message, "underExposedLikelihood"))
                                writer.uint32(/* id 13, wireType 0 =*/104).int32(message.underExposedLikelihood);
                            if (message.blurredLikelihood != null && Object.hasOwnProperty.call(message, "blurredLikelihood"))
                                writer.uint32(/* id 14, wireType 0 =*/112).int32(message.blurredLikelihood);
                            if (message.headwearLikelihood != null && Object.hasOwnProperty.call(message, "headwearLikelihood"))
                                writer.uint32(/* id 15, wireType 0 =*/120).int32(message.headwearLikelihood);
                            if (message.recognitionResult != null && message.recognitionResult.length)
                                for (var i = 0; i < message.recognitionResult.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult.encode(message.recognitionResult[i], writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified FaceAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IFaceAnnotation} message FaceAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        FaceAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.FaceAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.fdBoundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.landmarks && message.landmarks.length))
                                            message.landmarks = [];
                                        message.landmarks.push($root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.rollAngle = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.panAngle = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.tiltAngle = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.detectionConfidence = reader.float();
                                        break;
                                    }
                                case 8: {
                                        message.landmarkingConfidence = reader.float();
                                        break;
                                    }
                                case 9: {
                                        message.joyLikelihood = reader.int32();
                                        break;
                                    }
                                case 10: {
                                        message.sorrowLikelihood = reader.int32();
                                        break;
                                    }
                                case 11: {
                                        message.angerLikelihood = reader.int32();
                                        break;
                                    }
                                case 12: {
                                        message.surpriseLikelihood = reader.int32();
                                        break;
                                    }
                                case 13: {
                                        message.underExposedLikelihood = reader.int32();
                                        break;
                                    }
                                case 14: {
                                        message.blurredLikelihood = reader.int32();
                                        break;
                                    }
                                case 15: {
                                        message.headwearLikelihood = reader.int32();
                                        break;
                                    }
                                case 16: {
                                        if (!(message.recognitionResult && message.recognitionResult.length))
                                            message.recognitionResult = [];
                                        message.recognitionResult.push($root.google.cloud.vision.v1p4beta1.FaceRecognitionResult.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a FaceAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation} FaceAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        FaceAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a FaceAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        FaceAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.fdBoundingPoly);
                                if (error)
                                    return "fdBoundingPoly." + error;
                            }
                            if (message.landmarks != null && message.hasOwnProperty("landmarks")) {
                                if (!Array.isArray(message.landmarks))
                                    return "landmarks: array expected";
                                for (var i = 0; i < message.landmarks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.verify(message.landmarks[i]);
                                    if (error)
                                        return "landmarks." + error;
                                }
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                if (typeof message.rollAngle !== "number")
                                    return "rollAngle: number expected";
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                if (typeof message.panAngle !== "number")
                                    return "panAngle: number expected";
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                if (typeof message.tiltAngle !== "number")
                                    return "tiltAngle: number expected";
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                if (typeof message.detectionConfidence !== "number")
                                    return "detectionConfidence: number expected";
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                if (typeof message.landmarkingConfidence !== "number")
                                    return "landmarkingConfidence: number expected";
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                switch (message.joyLikelihood) {
                                default:
                                    return "joyLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                switch (message.sorrowLikelihood) {
                                default:
                                    return "sorrowLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                switch (message.angerLikelihood) {
                                default:
                                    return "angerLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                switch (message.surpriseLikelihood) {
                                default:
                                    return "surpriseLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                switch (message.underExposedLikelihood) {
                                default:
                                    return "underExposedLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                switch (message.blurredLikelihood) {
                                default:
                                    return "blurredLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                switch (message.headwearLikelihood) {
                                default:
                                    return "headwearLikelihood: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.recognitionResult != null && message.hasOwnProperty("recognitionResult")) {
                                if (!Array.isArray(message.recognitionResult))
                                    return "recognitionResult: array expected";
                                for (var i = 0; i < message.recognitionResult.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult.verify(message.recognitionResult[i]);
                                    if (error)
                                        return "recognitionResult." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a FaceAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation} FaceAnnotation
                         */
                        FaceAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.FaceAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.FaceAnnotation();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.fdBoundingPoly != null) {
                                if (typeof object.fdBoundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.fdBoundingPoly: object expected");
                                message.fdBoundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.fdBoundingPoly);
                            }
                            if (object.landmarks) {
                                if (!Array.isArray(object.landmarks))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.landmarks: array expected");
                                message.landmarks = [];
                                for (var i = 0; i < object.landmarks.length; ++i) {
                                    if (typeof object.landmarks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.landmarks: object expected");
                                    message.landmarks[i] = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.fromObject(object.landmarks[i]);
                                }
                            }
                            if (object.rollAngle != null)
                                message.rollAngle = Number(object.rollAngle);
                            if (object.panAngle != null)
                                message.panAngle = Number(object.panAngle);
                            if (object.tiltAngle != null)
                                message.tiltAngle = Number(object.tiltAngle);
                            if (object.detectionConfidence != null)
                                message.detectionConfidence = Number(object.detectionConfidence);
                            if (object.landmarkingConfidence != null)
                                message.landmarkingConfidence = Number(object.landmarkingConfidence);
                            switch (object.joyLikelihood) {
                            default:
                                if (typeof object.joyLikelihood === "number") {
                                    message.joyLikelihood = object.joyLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.joyLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.joyLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.joyLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.joyLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.joyLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.joyLikelihood = 5;
                                break;
                            }
                            switch (object.sorrowLikelihood) {
                            default:
                                if (typeof object.sorrowLikelihood === "number") {
                                    message.sorrowLikelihood = object.sorrowLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.sorrowLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.sorrowLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.sorrowLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.sorrowLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.sorrowLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.sorrowLikelihood = 5;
                                break;
                            }
                            switch (object.angerLikelihood) {
                            default:
                                if (typeof object.angerLikelihood === "number") {
                                    message.angerLikelihood = object.angerLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.angerLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.angerLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.angerLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.angerLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.angerLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.angerLikelihood = 5;
                                break;
                            }
                            switch (object.surpriseLikelihood) {
                            default:
                                if (typeof object.surpriseLikelihood === "number") {
                                    message.surpriseLikelihood = object.surpriseLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.surpriseLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.surpriseLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.surpriseLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.surpriseLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.surpriseLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.surpriseLikelihood = 5;
                                break;
                            }
                            switch (object.underExposedLikelihood) {
                            default:
                                if (typeof object.underExposedLikelihood === "number") {
                                    message.underExposedLikelihood = object.underExposedLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.underExposedLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.underExposedLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.underExposedLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.underExposedLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.underExposedLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.underExposedLikelihood = 5;
                                break;
                            }
                            switch (object.blurredLikelihood) {
                            default:
                                if (typeof object.blurredLikelihood === "number") {
                                    message.blurredLikelihood = object.blurredLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blurredLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.blurredLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.blurredLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.blurredLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.blurredLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.blurredLikelihood = 5;
                                break;
                            }
                            switch (object.headwearLikelihood) {
                            default:
                                if (typeof object.headwearLikelihood === "number") {
                                    message.headwearLikelihood = object.headwearLikelihood;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.headwearLikelihood = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.headwearLikelihood = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.headwearLikelihood = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.headwearLikelihood = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.headwearLikelihood = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.headwearLikelihood = 5;
                                break;
                            }
                            if (object.recognitionResult) {
                                if (!Array.isArray(object.recognitionResult))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.recognitionResult: array expected");
                                message.recognitionResult = [];
                                for (var i = 0; i < object.recognitionResult.length; ++i) {
                                    if (typeof object.recognitionResult[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.recognitionResult: object expected");
                                    message.recognitionResult[i] = $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult.fromObject(object.recognitionResult[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a FaceAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.FaceAnnotation} message FaceAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        FaceAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.landmarks = [];
                                object.recognitionResult = [];
                            }
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.fdBoundingPoly = null;
                                object.rollAngle = 0;
                                object.panAngle = 0;
                                object.tiltAngle = 0;
                                object.detectionConfidence = 0;
                                object.landmarkingConfidence = 0;
                                object.joyLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.sorrowLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.angerLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.surpriseLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.underExposedLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.blurredLikelihood = options.enums === String ? "UNKNOWN" : 0;
                                object.headwearLikelihood = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.fdBoundingPoly != null && message.hasOwnProperty("fdBoundingPoly"))
                                object.fdBoundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.fdBoundingPoly, options);
                            if (message.landmarks && message.landmarks.length) {
                                object.landmarks = [];
                                for (var j = 0; j < message.landmarks.length; ++j)
                                    object.landmarks[j] = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.toObject(message.landmarks[j], options);
                            }
                            if (message.rollAngle != null && message.hasOwnProperty("rollAngle"))
                                object.rollAngle = options.json && !isFinite(message.rollAngle) ? String(message.rollAngle) : message.rollAngle;
                            if (message.panAngle != null && message.hasOwnProperty("panAngle"))
                                object.panAngle = options.json && !isFinite(message.panAngle) ? String(message.panAngle) : message.panAngle;
                            if (message.tiltAngle != null && message.hasOwnProperty("tiltAngle"))
                                object.tiltAngle = options.json && !isFinite(message.tiltAngle) ? String(message.tiltAngle) : message.tiltAngle;
                            if (message.detectionConfidence != null && message.hasOwnProperty("detectionConfidence"))
                                object.detectionConfidence = options.json && !isFinite(message.detectionConfidence) ? String(message.detectionConfidence) : message.detectionConfidence;
                            if (message.landmarkingConfidence != null && message.hasOwnProperty("landmarkingConfidence"))
                                object.landmarkingConfidence = options.json && !isFinite(message.landmarkingConfidence) ? String(message.landmarkingConfidence) : message.landmarkingConfidence;
                            if (message.joyLikelihood != null && message.hasOwnProperty("joyLikelihood"))
                                object.joyLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.joyLikelihood] === undefined ? message.joyLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.joyLikelihood] : message.joyLikelihood;
                            if (message.sorrowLikelihood != null && message.hasOwnProperty("sorrowLikelihood"))
                                object.sorrowLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.sorrowLikelihood] === undefined ? message.sorrowLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.sorrowLikelihood] : message.sorrowLikelihood;
                            if (message.angerLikelihood != null && message.hasOwnProperty("angerLikelihood"))
                                object.angerLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.angerLikelihood] === undefined ? message.angerLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.angerLikelihood] : message.angerLikelihood;
                            if (message.surpriseLikelihood != null && message.hasOwnProperty("surpriseLikelihood"))
                                object.surpriseLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.surpriseLikelihood] === undefined ? message.surpriseLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.surpriseLikelihood] : message.surpriseLikelihood;
                            if (message.underExposedLikelihood != null && message.hasOwnProperty("underExposedLikelihood"))
                                object.underExposedLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.underExposedLikelihood] === undefined ? message.underExposedLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.underExposedLikelihood] : message.underExposedLikelihood;
                            if (message.blurredLikelihood != null && message.hasOwnProperty("blurredLikelihood"))
                                object.blurredLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.blurredLikelihood] === undefined ? message.blurredLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.blurredLikelihood] : message.blurredLikelihood;
                            if (message.headwearLikelihood != null && message.hasOwnProperty("headwearLikelihood"))
                                object.headwearLikelihood = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.headwearLikelihood] === undefined ? message.headwearLikelihood : $root.google.cloud.vision.v1p4beta1.Likelihood[message.headwearLikelihood] : message.headwearLikelihood;
                            if (message.recognitionResult && message.recognitionResult.length) {
                                object.recognitionResult = [];
                                for (var j = 0; j < message.recognitionResult.length; ++j)
                                    object.recognitionResult[j] = $root.google.cloud.vision.v1p4beta1.FaceRecognitionResult.toObject(message.recognitionResult[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this FaceAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        FaceAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for FaceAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        FaceAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.FaceAnnotation";
                        };
    
                        FaceAnnotation.Landmark = (function() {
    
                            /**
                             * Properties of a Landmark.
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                             * @interface ILandmark
                             * @property {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type|null} [type] Landmark type
                             * @property {google.cloud.vision.v1p4beta1.IPosition|null} [position] Landmark position
                             */
    
                            /**
                             * Constructs a new Landmark.
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation
                             * @classdesc Represents a Landmark.
                             * @implements ILandmark
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             */
                            function Landmark(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Landmark type.
                             * @member {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type} type
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.type = 0;
    
                            /**
                             * Landmark position.
                             * @member {google.cloud.vision.v1p4beta1.IPosition|null|undefined} position
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @instance
                             */
                            Landmark.prototype.position = null;
    
                            /**
                             * Creates a new Landmark instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} Landmark instance
                             */
                            Landmark.create = function create(properties) {
                                return new Landmark(properties);
                            };
    
                            /**
                             * Encodes the specified Landmark message. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 3, wireType 0 =*/24).int32(message.type);
                                if (message.position != null && Object.hasOwnProperty.call(message, "position"))
                                    $root.google.cloud.vision.v1p4beta1.Position.encode(message.position, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Landmark message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.FaceAnnotation.ILandmark} message Landmark message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Landmark.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 3: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 4: {
                                            message.position = $root.google.cloud.vision.v1p4beta1.Position.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Landmark message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} Landmark
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Landmark.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Landmark message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Landmark.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                    case 6:
                                    case 7:
                                    case 8:
                                    case 9:
                                    case 10:
                                    case 11:
                                    case 12:
                                    case 13:
                                    case 14:
                                    case 15:
                                    case 16:
                                    case 17:
                                    case 18:
                                    case 19:
                                    case 20:
                                    case 21:
                                    case 22:
                                    case 23:
                                    case 24:
                                    case 25:
                                    case 26:
                                    case 27:
                                    case 28:
                                    case 29:
                                    case 30:
                                    case 31:
                                    case 32:
                                    case 33:
                                    case 34:
                                        break;
                                    }
                                if (message.position != null && message.hasOwnProperty("position")) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Position.verify(message.position);
                                    if (error)
                                        return "position." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a Landmark message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} Landmark
                             */
                            Landmark.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN_LANDMARK":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "LEFT_EYE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "RIGHT_EYE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "LEFT_OF_LEFT_EYEBROW":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "RIGHT_OF_LEFT_EYEBROW":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LEFT_OF_RIGHT_EYEBROW":
                                case 5:
                                    message.type = 5;
                                    break;
                                case "RIGHT_OF_RIGHT_EYEBROW":
                                case 6:
                                    message.type = 6;
                                    break;
                                case "MIDPOINT_BETWEEN_EYES":
                                case 7:
                                    message.type = 7;
                                    break;
                                case "NOSE_TIP":
                                case 8:
                                    message.type = 8;
                                    break;
                                case "UPPER_LIP":
                                case 9:
                                    message.type = 9;
                                    break;
                                case "LOWER_LIP":
                                case 10:
                                    message.type = 10;
                                    break;
                                case "MOUTH_LEFT":
                                case 11:
                                    message.type = 11;
                                    break;
                                case "MOUTH_RIGHT":
                                case 12:
                                    message.type = 12;
                                    break;
                                case "MOUTH_CENTER":
                                case 13:
                                    message.type = 13;
                                    break;
                                case "NOSE_BOTTOM_RIGHT":
                                case 14:
                                    message.type = 14;
                                    break;
                                case "NOSE_BOTTOM_LEFT":
                                case 15:
                                    message.type = 15;
                                    break;
                                case "NOSE_BOTTOM_CENTER":
                                case 16:
                                    message.type = 16;
                                    break;
                                case "LEFT_EYE_TOP_BOUNDARY":
                                case 17:
                                    message.type = 17;
                                    break;
                                case "LEFT_EYE_RIGHT_CORNER":
                                case 18:
                                    message.type = 18;
                                    break;
                                case "LEFT_EYE_BOTTOM_BOUNDARY":
                                case 19:
                                    message.type = 19;
                                    break;
                                case "LEFT_EYE_LEFT_CORNER":
                                case 20:
                                    message.type = 20;
                                    break;
                                case "RIGHT_EYE_TOP_BOUNDARY":
                                case 21:
                                    message.type = 21;
                                    break;
                                case "RIGHT_EYE_RIGHT_CORNER":
                                case 22:
                                    message.type = 22;
                                    break;
                                case "RIGHT_EYE_BOTTOM_BOUNDARY":
                                case 23:
                                    message.type = 23;
                                    break;
                                case "RIGHT_EYE_LEFT_CORNER":
                                case 24:
                                    message.type = 24;
                                    break;
                                case "LEFT_EYEBROW_UPPER_MIDPOINT":
                                case 25:
                                    message.type = 25;
                                    break;
                                case "RIGHT_EYEBROW_UPPER_MIDPOINT":
                                case 26:
                                    message.type = 26;
                                    break;
                                case "LEFT_EAR_TRAGION":
                                case 27:
                                    message.type = 27;
                                    break;
                                case "RIGHT_EAR_TRAGION":
                                case 28:
                                    message.type = 28;
                                    break;
                                case "LEFT_EYE_PUPIL":
                                case 29:
                                    message.type = 29;
                                    break;
                                case "RIGHT_EYE_PUPIL":
                                case 30:
                                    message.type = 30;
                                    break;
                                case "FOREHEAD_GLABELLA":
                                case 31:
                                    message.type = 31;
                                    break;
                                case "CHIN_GNATHION":
                                case 32:
                                    message.type = 32;
                                    break;
                                case "CHIN_LEFT_GONION":
                                case 33:
                                    message.type = 33;
                                    break;
                                case "CHIN_RIGHT_GONION":
                                case 34:
                                    message.type = 34;
                                    break;
                                }
                                if (object.position != null) {
                                    if (typeof object.position !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.position: object expected");
                                    message.position = $root.google.cloud.vision.v1p4beta1.Position.fromObject(object.position);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Landmark message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark} message Landmark
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Landmark.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN_LANDMARK" : 0;
                                    object.position = null;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type[message.type] : message.type;
                                if (message.position != null && message.hasOwnProperty("position"))
                                    object.position = $root.google.cloud.vision.v1p4beta1.Position.toObject(message.position, options);
                                return object;
                            };
    
                            /**
                             * Converts this Landmark to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Landmark.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Landmark
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Landmark.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark";
                            };
    
                            /**
                             * Type enum.
                             * @name google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Type
                             * @enum {number}
                             * @property {number} UNKNOWN_LANDMARK=0 UNKNOWN_LANDMARK value
                             * @property {number} LEFT_EYE=1 LEFT_EYE value
                             * @property {number} RIGHT_EYE=2 RIGHT_EYE value
                             * @property {number} LEFT_OF_LEFT_EYEBROW=3 LEFT_OF_LEFT_EYEBROW value
                             * @property {number} RIGHT_OF_LEFT_EYEBROW=4 RIGHT_OF_LEFT_EYEBROW value
                             * @property {number} LEFT_OF_RIGHT_EYEBROW=5 LEFT_OF_RIGHT_EYEBROW value
                             * @property {number} RIGHT_OF_RIGHT_EYEBROW=6 RIGHT_OF_RIGHT_EYEBROW value
                             * @property {number} MIDPOINT_BETWEEN_EYES=7 MIDPOINT_BETWEEN_EYES value
                             * @property {number} NOSE_TIP=8 NOSE_TIP value
                             * @property {number} UPPER_LIP=9 UPPER_LIP value
                             * @property {number} LOWER_LIP=10 LOWER_LIP value
                             * @property {number} MOUTH_LEFT=11 MOUTH_LEFT value
                             * @property {number} MOUTH_RIGHT=12 MOUTH_RIGHT value
                             * @property {number} MOUTH_CENTER=13 MOUTH_CENTER value
                             * @property {number} NOSE_BOTTOM_RIGHT=14 NOSE_BOTTOM_RIGHT value
                             * @property {number} NOSE_BOTTOM_LEFT=15 NOSE_BOTTOM_LEFT value
                             * @property {number} NOSE_BOTTOM_CENTER=16 NOSE_BOTTOM_CENTER value
                             * @property {number} LEFT_EYE_TOP_BOUNDARY=17 LEFT_EYE_TOP_BOUNDARY value
                             * @property {number} LEFT_EYE_RIGHT_CORNER=18 LEFT_EYE_RIGHT_CORNER value
                             * @property {number} LEFT_EYE_BOTTOM_BOUNDARY=19 LEFT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} LEFT_EYE_LEFT_CORNER=20 LEFT_EYE_LEFT_CORNER value
                             * @property {number} RIGHT_EYE_TOP_BOUNDARY=21 RIGHT_EYE_TOP_BOUNDARY value
                             * @property {number} RIGHT_EYE_RIGHT_CORNER=22 RIGHT_EYE_RIGHT_CORNER value
                             * @property {number} RIGHT_EYE_BOTTOM_BOUNDARY=23 RIGHT_EYE_BOTTOM_BOUNDARY value
                             * @property {number} RIGHT_EYE_LEFT_CORNER=24 RIGHT_EYE_LEFT_CORNER value
                             * @property {number} LEFT_EYEBROW_UPPER_MIDPOINT=25 LEFT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} RIGHT_EYEBROW_UPPER_MIDPOINT=26 RIGHT_EYEBROW_UPPER_MIDPOINT value
                             * @property {number} LEFT_EAR_TRAGION=27 LEFT_EAR_TRAGION value
                             * @property {number} RIGHT_EAR_TRAGION=28 RIGHT_EAR_TRAGION value
                             * @property {number} LEFT_EYE_PUPIL=29 LEFT_EYE_PUPIL value
                             * @property {number} RIGHT_EYE_PUPIL=30 RIGHT_EYE_PUPIL value
                             * @property {number} FOREHEAD_GLABELLA=31 FOREHEAD_GLABELLA value
                             * @property {number} CHIN_GNATHION=32 CHIN_GNATHION value
                             * @property {number} CHIN_LEFT_GONION=33 CHIN_LEFT_GONION value
                             * @property {number} CHIN_RIGHT_GONION=34 CHIN_RIGHT_GONION value
                             */
                            Landmark.Type = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN_LANDMARK"] = 0;
                                values[valuesById[1] = "LEFT_EYE"] = 1;
                                values[valuesById[2] = "RIGHT_EYE"] = 2;
                                values[valuesById[3] = "LEFT_OF_LEFT_EYEBROW"] = 3;
                                values[valuesById[4] = "RIGHT_OF_LEFT_EYEBROW"] = 4;
                                values[valuesById[5] = "LEFT_OF_RIGHT_EYEBROW"] = 5;
                                values[valuesById[6] = "RIGHT_OF_RIGHT_EYEBROW"] = 6;
                                values[valuesById[7] = "MIDPOINT_BETWEEN_EYES"] = 7;
                                values[valuesById[8] = "NOSE_TIP"] = 8;
                                values[valuesById[9] = "UPPER_LIP"] = 9;
                                values[valuesById[10] = "LOWER_LIP"] = 10;
                                values[valuesById[11] = "MOUTH_LEFT"] = 11;
                                values[valuesById[12] = "MOUTH_RIGHT"] = 12;
                                values[valuesById[13] = "MOUTH_CENTER"] = 13;
                                values[valuesById[14] = "NOSE_BOTTOM_RIGHT"] = 14;
                                values[valuesById[15] = "NOSE_BOTTOM_LEFT"] = 15;
                                values[valuesById[16] = "NOSE_BOTTOM_CENTER"] = 16;
                                values[valuesById[17] = "LEFT_EYE_TOP_BOUNDARY"] = 17;
                                values[valuesById[18] = "LEFT_EYE_RIGHT_CORNER"] = 18;
                                values[valuesById[19] = "LEFT_EYE_BOTTOM_BOUNDARY"] = 19;
                                values[valuesById[20] = "LEFT_EYE_LEFT_CORNER"] = 20;
                                values[valuesById[21] = "RIGHT_EYE_TOP_BOUNDARY"] = 21;
                                values[valuesById[22] = "RIGHT_EYE_RIGHT_CORNER"] = 22;
                                values[valuesById[23] = "RIGHT_EYE_BOTTOM_BOUNDARY"] = 23;
                                values[valuesById[24] = "RIGHT_EYE_LEFT_CORNER"] = 24;
                                values[valuesById[25] = "LEFT_EYEBROW_UPPER_MIDPOINT"] = 25;
                                values[valuesById[26] = "RIGHT_EYEBROW_UPPER_MIDPOINT"] = 26;
                                values[valuesById[27] = "LEFT_EAR_TRAGION"] = 27;
                                values[valuesById[28] = "RIGHT_EAR_TRAGION"] = 28;
                                values[valuesById[29] = "LEFT_EYE_PUPIL"] = 29;
                                values[valuesById[30] = "RIGHT_EYE_PUPIL"] = 30;
                                values[valuesById[31] = "FOREHEAD_GLABELLA"] = 31;
                                values[valuesById[32] = "CHIN_GNATHION"] = 32;
                                values[valuesById[33] = "CHIN_LEFT_GONION"] = 33;
                                values[valuesById[34] = "CHIN_RIGHT_GONION"] = 34;
                                return values;
                            })();
    
                            return Landmark;
                        })();
    
                        return FaceAnnotation;
                    })();
    
                    v1p4beta1.LocationInfo = (function() {
    
                        /**
                         * Properties of a LocationInfo.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ILocationInfo
                         * @property {google.type.ILatLng|null} [latLng] LocationInfo latLng
                         */
    
                        /**
                         * Constructs a new LocationInfo.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a LocationInfo.
                         * @implements ILocationInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ILocationInfo=} [properties] Properties to set
                         */
                        function LocationInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocationInfo latLng.
                         * @member {google.type.ILatLng|null|undefined} latLng
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @instance
                         */
                        LocationInfo.prototype.latLng = null;
    
                        /**
                         * Creates a new LocationInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocationInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.LocationInfo} LocationInfo instance
                         */
                        LocationInfo.create = function create(properties) {
                            return new LocationInfo(properties);
                        };
    
                        /**
                         * Encodes the specified LocationInfo message. Does not implicitly {@link google.cloud.vision.v1p4beta1.LocationInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLng != null && Object.hasOwnProperty.call(message, "latLng"))
                                $root.google.type.LatLng.encode(message.latLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocationInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.LocationInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocationInfo} message LocationInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.LocationInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocationInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.LocationInfo} LocationInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocationInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocationInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocationInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLng != null && message.hasOwnProperty("latLng")) {
                                var error = $root.google.type.LatLng.verify(message.latLng);
                                if (error)
                                    return "latLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocationInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.LocationInfo} LocationInfo
                         */
                        LocationInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.LocationInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.LocationInfo();
                            if (object.latLng != null) {
                                if (typeof object.latLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.LocationInfo.latLng: object expected");
                                message.latLng = $root.google.type.LatLng.fromObject(object.latLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocationInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.LocationInfo} message LocationInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocationInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.latLng = null;
                            if (message.latLng != null && message.hasOwnProperty("latLng"))
                                object.latLng = $root.google.type.LatLng.toObject(message.latLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocationInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocationInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocationInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.LocationInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.LocationInfo";
                        };
    
                        return LocationInfo;
                    })();
    
                    v1p4beta1.Property = (function() {
    
                        /**
                         * Properties of a Property.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProperty
                         * @property {string|null} [name] Property name
                         * @property {string|null} [value] Property value
                         * @property {number|Long|null} [uint64Value] Property uint64Value
                         */
    
                        /**
                         * Constructs a new Property.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Property.
                         * @implements IProperty
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProperty=} [properties] Properties to set
                         */
                        function Property(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Property name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @instance
                         */
                        Property.prototype.name = "";
    
                        /**
                         * Property value.
                         * @member {string} value
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @instance
                         */
                        Property.prototype.value = "";
    
                        /**
                         * Property uint64Value.
                         * @member {number|Long} uint64Value
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @instance
                         */
                        Property.prototype.uint64Value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                        /**
                         * Creates a new Property instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProperty=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Property} Property instance
                         */
                        Property.create = function create(properties) {
                            return new Property(properties);
                        };
    
                        /**
                         * Encodes the specified Property message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Property.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                            if (message.uint64Value != null && Object.hasOwnProperty.call(message, "uint64Value"))
                                writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.uint64Value);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Property message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Property.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProperty} message Property message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Property.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Property();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.value = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.uint64Value = reader.uint64();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Property message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Property} Property
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Property.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Property message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Property.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.value != null && message.hasOwnProperty("value"))
                                if (!$util.isString(message.value))
                                    return "value: string expected";
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (!$util.isInteger(message.uint64Value) && !(message.uint64Value && $util.isInteger(message.uint64Value.low) && $util.isInteger(message.uint64Value.high)))
                                    return "uint64Value: integer|Long expected";
                            return null;
                        };
    
                        /**
                         * Creates a Property message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Property} Property
                         */
                        Property.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Property)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Property();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.value != null)
                                message.value = String(object.value);
                            if (object.uint64Value != null)
                                if ($util.Long)
                                    (message.uint64Value = $util.Long.fromValue(object.uint64Value)).unsigned = true;
                                else if (typeof object.uint64Value === "string")
                                    message.uint64Value = parseInt(object.uint64Value, 10);
                                else if (typeof object.uint64Value === "number")
                                    message.uint64Value = object.uint64Value;
                                else if (typeof object.uint64Value === "object")
                                    message.uint64Value = new $util.LongBits(object.uint64Value.low >>> 0, object.uint64Value.high >>> 0).toNumber(true);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Property message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Property} message Property
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Property.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.value = "";
                                if ($util.Long) {
                                    var long = new $util.Long(0, 0, true);
                                    object.uint64Value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                                } else
                                    object.uint64Value = options.longs === String ? "0" : 0;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.value != null && message.hasOwnProperty("value"))
                                object.value = message.value;
                            if (message.uint64Value != null && message.hasOwnProperty("uint64Value"))
                                if (typeof message.uint64Value === "number")
                                    object.uint64Value = options.longs === String ? String(message.uint64Value) : message.uint64Value;
                                else
                                    object.uint64Value = options.longs === String ? $util.Long.prototype.toString.call(message.uint64Value) : options.longs === Number ? new $util.LongBits(message.uint64Value.low >>> 0, message.uint64Value.high >>> 0).toNumber(true) : message.uint64Value;
                            return object;
                        };
    
                        /**
                         * Converts this Property to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Property.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Property
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Property
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Property.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Property";
                        };
    
                        return Property;
                    })();
    
                    v1p4beta1.EntityAnnotation = (function() {
    
                        /**
                         * Properties of an EntityAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IEntityAnnotation
                         * @property {string|null} [mid] EntityAnnotation mid
                         * @property {string|null} [locale] EntityAnnotation locale
                         * @property {string|null} [description] EntityAnnotation description
                         * @property {number|null} [score] EntityAnnotation score
                         * @property {number|null} [confidence] EntityAnnotation confidence
                         * @property {number|null} [topicality] EntityAnnotation topicality
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] EntityAnnotation boundingPoly
                         * @property {Array.<google.cloud.vision.v1p4beta1.ILocationInfo>|null} [locations] EntityAnnotation locations
                         * @property {Array.<google.cloud.vision.v1p4beta1.IProperty>|null} [properties] EntityAnnotation properties
                         */
    
                        /**
                         * Constructs a new EntityAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an EntityAnnotation.
                         * @implements IEntityAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IEntityAnnotation=} [properties] Properties to set
                         */
                        function EntityAnnotation(properties) {
                            this.locations = [];
                            this.properties = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * EntityAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.mid = "";
    
                        /**
                         * EntityAnnotation locale.
                         * @member {string} locale
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locale = "";
    
                        /**
                         * EntityAnnotation description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.description = "";
    
                        /**
                         * EntityAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.score = 0;
    
                        /**
                         * EntityAnnotation confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.confidence = 0;
    
                        /**
                         * EntityAnnotation topicality.
                         * @member {number} topicality
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.topicality = 0;
    
                        /**
                         * EntityAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * EntityAnnotation locations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ILocationInfo>} locations
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.locations = $util.emptyArray;
    
                        /**
                         * EntityAnnotation properties.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IProperty>} properties
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         */
                        EntityAnnotation.prototype.properties = $util.emptyArray;
    
                        /**
                         * Creates a new EntityAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IEntityAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.EntityAnnotation} EntityAnnotation instance
                         */
                        EntityAnnotation.create = function create(properties) {
                            return new EntityAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.EntityAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.locale != null && Object.hasOwnProperty.call(message, "locale"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.locale);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            if (message.topicality != null && Object.hasOwnProperty.call(message, "topicality"))
                                writer.uint32(/* id 6, wireType 5 =*/53).float(message.topicality);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                            if (message.locations != null && message.locations.length)
                                for (var i = 0; i < message.locations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.LocationInfo.encode(message.locations[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.properties != null && message.properties.length)
                                for (var i = 0; i < message.properties.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Property.encode(message.properties[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified EntityAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.EntityAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IEntityAnnotation} message EntityAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        EntityAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.EntityAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.locale = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 6: {
                                        message.topicality = reader.float();
                                        break;
                                    }
                                case 7: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        if (!(message.locations && message.locations.length))
                                            message.locations = [];
                                        message.locations.push($root.google.cloud.vision.v1p4beta1.LocationInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 9: {
                                        if (!(message.properties && message.properties.length))
                                            message.properties = [];
                                        message.properties.push($root.google.cloud.vision.v1p4beta1.Property.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an EntityAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.EntityAnnotation} EntityAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        EntityAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an EntityAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        EntityAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                if (!$util.isString(message.locale))
                                    return "locale: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                if (typeof message.topicality !== "number")
                                    return "topicality: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.locations != null && message.hasOwnProperty("locations")) {
                                if (!Array.isArray(message.locations))
                                    return "locations: array expected";
                                for (var i = 0; i < message.locations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.LocationInfo.verify(message.locations[i]);
                                    if (error)
                                        return "locations." + error;
                                }
                            }
                            if (message.properties != null && message.hasOwnProperty("properties")) {
                                if (!Array.isArray(message.properties))
                                    return "properties: array expected";
                                for (var i = 0; i < message.properties.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Property.verify(message.properties[i]);
                                    if (error)
                                        return "properties." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an EntityAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.EntityAnnotation} EntityAnnotation
                         */
                        EntityAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.EntityAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.EntityAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.locale != null)
                                message.locale = String(object.locale);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.topicality != null)
                                message.topicality = Number(object.topicality);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.EntityAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.locations) {
                                if (!Array.isArray(object.locations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.EntityAnnotation.locations: array expected");
                                message.locations = [];
                                for (var i = 0; i < object.locations.length; ++i) {
                                    if (typeof object.locations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.EntityAnnotation.locations: object expected");
                                    message.locations[i] = $root.google.cloud.vision.v1p4beta1.LocationInfo.fromObject(object.locations[i]);
                                }
                            }
                            if (object.properties) {
                                if (!Array.isArray(object.properties))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.EntityAnnotation.properties: array expected");
                                message.properties = [];
                                for (var i = 0; i < object.properties.length; ++i) {
                                    if (typeof object.properties[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.EntityAnnotation.properties: object expected");
                                    message.properties[i] = $root.google.cloud.vision.v1p4beta1.Property.fromObject(object.properties[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an EntityAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.EntityAnnotation} message EntityAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        EntityAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.locations = [];
                                object.properties = [];
                            }
                            if (options.defaults) {
                                object.mid = "";
                                object.locale = "";
                                object.description = "";
                                object.score = 0;
                                object.confidence = 0;
                                object.topicality = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.locale != null && message.hasOwnProperty("locale"))
                                object.locale = message.locale;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.topicality != null && message.hasOwnProperty("topicality"))
                                object.topicality = options.json && !isFinite(message.topicality) ? String(message.topicality) : message.topicality;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.locations && message.locations.length) {
                                object.locations = [];
                                for (var j = 0; j < message.locations.length; ++j)
                                    object.locations[j] = $root.google.cloud.vision.v1p4beta1.LocationInfo.toObject(message.locations[j], options);
                            }
                            if (message.properties && message.properties.length) {
                                object.properties = [];
                                for (var j = 0; j < message.properties.length; ++j)
                                    object.properties[j] = $root.google.cloud.vision.v1p4beta1.Property.toObject(message.properties[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this EntityAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        EntityAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for EntityAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.EntityAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        EntityAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.EntityAnnotation";
                        };
    
                        return EntityAnnotation;
                    })();
    
                    v1p4beta1.LocalizedObjectAnnotation = (function() {
    
                        /**
                         * Properties of a LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ILocalizedObjectAnnotation
                         * @property {string|null} [mid] LocalizedObjectAnnotation mid
                         * @property {string|null} [languageCode] LocalizedObjectAnnotation languageCode
                         * @property {string|null} [name] LocalizedObjectAnnotation name
                         * @property {number|null} [score] LocalizedObjectAnnotation score
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] LocalizedObjectAnnotation boundingPoly
                         */
    
                        /**
                         * Constructs a new LocalizedObjectAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a LocalizedObjectAnnotation.
                         * @implements ILocalizedObjectAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         */
                        function LocalizedObjectAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LocalizedObjectAnnotation mid.
                         * @member {string} mid
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.mid = "";
    
                        /**
                         * LocalizedObjectAnnotation languageCode.
                         * @member {string} languageCode
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.languageCode = "";
    
                        /**
                         * LocalizedObjectAnnotation name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.name = "";
    
                        /**
                         * LocalizedObjectAnnotation score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.score = 0;
    
                        /**
                         * LocalizedObjectAnnotation boundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         */
                        LocalizedObjectAnnotation.prototype.boundingPoly = null;
    
                        /**
                         * Creates a new LocalizedObjectAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation instance
                         */
                        LocalizedObjectAnnotation.create = function create(properties) {
                            return new LocalizedObjectAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                            if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LocalizedObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation} message LocalizedObjectAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LocalizedObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.mid = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.languageCode = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 5: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LocalizedObjectAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LocalizedObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LocalizedObjectAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LocalizedObjectAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                if (!$util.isString(message.mid))
                                    return "mid: string expected";
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                if (!$util.isString(message.languageCode))
                                    return "languageCode: string expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LocalizedObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} LocalizedObjectAnnotation
                         */
                        LocalizedObjectAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation();
                            if (object.mid != null)
                                message.mid = String(object.mid);
                            if (object.languageCode != null)
                                message.languageCode = String(object.languageCode);
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LocalizedObjectAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation} message LocalizedObjectAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LocalizedObjectAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.mid = "";
                                object.languageCode = "";
                                object.name = "";
                                object.score = 0;
                                object.boundingPoly = null;
                            }
                            if (message.mid != null && message.hasOwnProperty("mid"))
                                object.mid = message.mid;
                            if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                object.languageCode = message.languageCode;
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this LocalizedObjectAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LocalizedObjectAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LocalizedObjectAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LocalizedObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation";
                        };
    
                        return LocalizedObjectAnnotation;
                    })();
    
                    v1p4beta1.SafeSearchAnnotation = (function() {
    
                        /**
                         * Properties of a SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ISafeSearchAnnotation
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [adult] SafeSearchAnnotation adult
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [spoof] SafeSearchAnnotation spoof
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [medical] SafeSearchAnnotation medical
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [violence] SafeSearchAnnotation violence
                         * @property {google.cloud.vision.v1p4beta1.Likelihood|null} [racy] SafeSearchAnnotation racy
                         */
    
                        /**
                         * Constructs a new SafeSearchAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a SafeSearchAnnotation.
                         * @implements ISafeSearchAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         */
                        function SafeSearchAnnotation(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * SafeSearchAnnotation adult.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} adult
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.adult = 0;
    
                        /**
                         * SafeSearchAnnotation spoof.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} spoof
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.spoof = 0;
    
                        /**
                         * SafeSearchAnnotation medical.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} medical
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.medical = 0;
    
                        /**
                         * SafeSearchAnnotation violence.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} violence
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.violence = 0;
    
                        /**
                         * SafeSearchAnnotation racy.
                         * @member {google.cloud.vision.v1p4beta1.Likelihood} racy
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         */
                        SafeSearchAnnotation.prototype.racy = 0;
    
                        /**
                         * Creates a new SafeSearchAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.SafeSearchAnnotation} SafeSearchAnnotation instance
                         */
                        SafeSearchAnnotation.create = function create(properties) {
                            return new SafeSearchAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.adult != null && Object.hasOwnProperty.call(message, "adult"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.adult);
                            if (message.spoof != null && Object.hasOwnProperty.call(message, "spoof"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.spoof);
                            if (message.medical != null && Object.hasOwnProperty.call(message, "medical"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.medical);
                            if (message.violence != null && Object.hasOwnProperty.call(message, "violence"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.violence);
                            if (message.racy != null && Object.hasOwnProperty.call(message, "racy"))
                                writer.uint32(/* id 9, wireType 0 =*/72).int32(message.racy);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified SafeSearchAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.SafeSearchAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation} message SafeSearchAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        SafeSearchAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.adult = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.spoof = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.medical = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.violence = reader.int32();
                                        break;
                                    }
                                case 9: {
                                        message.racy = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a SafeSearchAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        SafeSearchAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a SafeSearchAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        SafeSearchAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                switch (message.adult) {
                                default:
                                    return "adult: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                switch (message.spoof) {
                                default:
                                    return "spoof: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                switch (message.medical) {
                                default:
                                    return "medical: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                switch (message.violence) {
                                default:
                                    return "violence: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                switch (message.racy) {
                                default:
                                    return "racy: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            return null;
                        };
    
                        /**
                         * Creates a SafeSearchAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.SafeSearchAnnotation} SafeSearchAnnotation
                         */
                        SafeSearchAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation();
                            switch (object.adult) {
                            default:
                                if (typeof object.adult === "number") {
                                    message.adult = object.adult;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.adult = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.adult = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.adult = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.adult = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.adult = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.adult = 5;
                                break;
                            }
                            switch (object.spoof) {
                            default:
                                if (typeof object.spoof === "number") {
                                    message.spoof = object.spoof;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.spoof = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.spoof = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.spoof = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.spoof = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.spoof = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.spoof = 5;
                                break;
                            }
                            switch (object.medical) {
                            default:
                                if (typeof object.medical === "number") {
                                    message.medical = object.medical;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.medical = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.medical = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.medical = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.medical = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.medical = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.medical = 5;
                                break;
                            }
                            switch (object.violence) {
                            default:
                                if (typeof object.violence === "number") {
                                    message.violence = object.violence;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.violence = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.violence = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.violence = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.violence = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.violence = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.violence = 5;
                                break;
                            }
                            switch (object.racy) {
                            default:
                                if (typeof object.racy === "number") {
                                    message.racy = object.racy;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.racy = 0;
                                break;
                            case "VERY_UNLIKELY":
                            case 1:
                                message.racy = 1;
                                break;
                            case "UNLIKELY":
                            case 2:
                                message.racy = 2;
                                break;
                            case "POSSIBLE":
                            case 3:
                                message.racy = 3;
                                break;
                            case "LIKELY":
                            case 4:
                                message.racy = 4;
                                break;
                            case "VERY_LIKELY":
                            case 5:
                                message.racy = 5;
                                break;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a SafeSearchAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.SafeSearchAnnotation} message SafeSearchAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        SafeSearchAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.adult = options.enums === String ? "UNKNOWN" : 0;
                                object.spoof = options.enums === String ? "UNKNOWN" : 0;
                                object.medical = options.enums === String ? "UNKNOWN" : 0;
                                object.violence = options.enums === String ? "UNKNOWN" : 0;
                                object.racy = options.enums === String ? "UNKNOWN" : 0;
                            }
                            if (message.adult != null && message.hasOwnProperty("adult"))
                                object.adult = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.adult] === undefined ? message.adult : $root.google.cloud.vision.v1p4beta1.Likelihood[message.adult] : message.adult;
                            if (message.spoof != null && message.hasOwnProperty("spoof"))
                                object.spoof = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.spoof] === undefined ? message.spoof : $root.google.cloud.vision.v1p4beta1.Likelihood[message.spoof] : message.spoof;
                            if (message.medical != null && message.hasOwnProperty("medical"))
                                object.medical = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.medical] === undefined ? message.medical : $root.google.cloud.vision.v1p4beta1.Likelihood[message.medical] : message.medical;
                            if (message.violence != null && message.hasOwnProperty("violence"))
                                object.violence = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.violence] === undefined ? message.violence : $root.google.cloud.vision.v1p4beta1.Likelihood[message.violence] : message.violence;
                            if (message.racy != null && message.hasOwnProperty("racy"))
                                object.racy = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Likelihood[message.racy] === undefined ? message.racy : $root.google.cloud.vision.v1p4beta1.Likelihood[message.racy] : message.racy;
                            return object;
                        };
    
                        /**
                         * Converts this SafeSearchAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        SafeSearchAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for SafeSearchAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.SafeSearchAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        SafeSearchAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.SafeSearchAnnotation";
                        };
    
                        return SafeSearchAnnotation;
                    })();
    
                    v1p4beta1.LatLongRect = (function() {
    
                        /**
                         * Properties of a LatLongRect.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ILatLongRect
                         * @property {google.type.ILatLng|null} [minLatLng] LatLongRect minLatLng
                         * @property {google.type.ILatLng|null} [maxLatLng] LatLongRect maxLatLng
                         */
    
                        /**
                         * Constructs a new LatLongRect.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a LatLongRect.
                         * @implements ILatLongRect
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ILatLongRect=} [properties] Properties to set
                         */
                        function LatLongRect(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * LatLongRect minLatLng.
                         * @member {google.type.ILatLng|null|undefined} minLatLng
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.minLatLng = null;
    
                        /**
                         * LatLongRect maxLatLng.
                         * @member {google.type.ILatLng|null|undefined} maxLatLng
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @instance
                         */
                        LatLongRect.prototype.maxLatLng = null;
    
                        /**
                         * Creates a new LatLongRect instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILatLongRect=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.LatLongRect} LatLongRect instance
                         */
                        LatLongRect.create = function create(properties) {
                            return new LatLongRect(properties);
                        };
    
                        /**
                         * Encodes the specified LatLongRect message. Does not implicitly {@link google.cloud.vision.v1p4beta1.LatLongRect.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.minLatLng != null && Object.hasOwnProperty.call(message, "minLatLng"))
                                $root.google.type.LatLng.encode(message.minLatLng, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.maxLatLng != null && Object.hasOwnProperty.call(message, "maxLatLng"))
                                $root.google.type.LatLng.encode(message.maxLatLng, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified LatLongRect message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.LatLongRect.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ILatLongRect} message LatLongRect message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        LatLongRect.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.LatLongRect();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.minLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.maxLatLng = $root.google.type.LatLng.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a LatLongRect message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.LatLongRect} LatLongRect
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        LatLongRect.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a LatLongRect message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        LatLongRect.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.minLatLng);
                                if (error)
                                    return "minLatLng." + error;
                            }
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng")) {
                                var error = $root.google.type.LatLng.verify(message.maxLatLng);
                                if (error)
                                    return "maxLatLng." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a LatLongRect message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.LatLongRect} LatLongRect
                         */
                        LatLongRect.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.LatLongRect)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.LatLongRect();
                            if (object.minLatLng != null) {
                                if (typeof object.minLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.LatLongRect.minLatLng: object expected");
                                message.minLatLng = $root.google.type.LatLng.fromObject(object.minLatLng);
                            }
                            if (object.maxLatLng != null) {
                                if (typeof object.maxLatLng !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.LatLongRect.maxLatLng: object expected");
                                message.maxLatLng = $root.google.type.LatLng.fromObject(object.maxLatLng);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a LatLongRect message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.LatLongRect} message LatLongRect
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        LatLongRect.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.minLatLng = null;
                                object.maxLatLng = null;
                            }
                            if (message.minLatLng != null && message.hasOwnProperty("minLatLng"))
                                object.minLatLng = $root.google.type.LatLng.toObject(message.minLatLng, options);
                            if (message.maxLatLng != null && message.hasOwnProperty("maxLatLng"))
                                object.maxLatLng = $root.google.type.LatLng.toObject(message.maxLatLng, options);
                            return object;
                        };
    
                        /**
                         * Converts this LatLongRect to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        LatLongRect.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for LatLongRect
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.LatLongRect
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        LatLongRect.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.LatLongRect";
                        };
    
                        return LatLongRect;
                    })();
    
                    v1p4beta1.ColorInfo = (function() {
    
                        /**
                         * Properties of a ColorInfo.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IColorInfo
                         * @property {google.type.IColor|null} [color] ColorInfo color
                         * @property {number|null} [score] ColorInfo score
                         * @property {number|null} [pixelFraction] ColorInfo pixelFraction
                         */
    
                        /**
                         * Constructs a new ColorInfo.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ColorInfo.
                         * @implements IColorInfo
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IColorInfo=} [properties] Properties to set
                         */
                        function ColorInfo(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ColorInfo color.
                         * @member {google.type.IColor|null|undefined} color
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.color = null;
    
                        /**
                         * ColorInfo score.
                         * @member {number} score
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.score = 0;
    
                        /**
                         * ColorInfo pixelFraction.
                         * @member {number} pixelFraction
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @instance
                         */
                        ColorInfo.prototype.pixelFraction = 0;
    
                        /**
                         * Creates a new ColorInfo instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IColorInfo=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ColorInfo} ColorInfo instance
                         */
                        ColorInfo.create = function create(properties) {
                            return new ColorInfo(properties);
                        };
    
                        /**
                         * Encodes the specified ColorInfo message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ColorInfo.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.color != null && Object.hasOwnProperty.call(message, "color"))
                                $root.google.type.Color.encode(message.color, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                            if (message.pixelFraction != null && Object.hasOwnProperty.call(message, "pixelFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.pixelFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ColorInfo message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ColorInfo.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IColorInfo} message ColorInfo message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ColorInfo.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ColorInfo();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.color = $root.google.type.Color.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.score = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.pixelFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ColorInfo message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ColorInfo} ColorInfo
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ColorInfo.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ColorInfo message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ColorInfo.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.color != null && message.hasOwnProperty("color")) {
                                var error = $root.google.type.Color.verify(message.color);
                                if (error)
                                    return "color." + error;
                            }
                            if (message.score != null && message.hasOwnProperty("score"))
                                if (typeof message.score !== "number")
                                    return "score: number expected";
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                if (typeof message.pixelFraction !== "number")
                                    return "pixelFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a ColorInfo message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ColorInfo} ColorInfo
                         */
                        ColorInfo.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ColorInfo)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ColorInfo();
                            if (object.color != null) {
                                if (typeof object.color !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ColorInfo.color: object expected");
                                message.color = $root.google.type.Color.fromObject(object.color);
                            }
                            if (object.score != null)
                                message.score = Number(object.score);
                            if (object.pixelFraction != null)
                                message.pixelFraction = Number(object.pixelFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ColorInfo message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ColorInfo} message ColorInfo
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ColorInfo.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.color = null;
                                object.score = 0;
                                object.pixelFraction = 0;
                            }
                            if (message.color != null && message.hasOwnProperty("color"))
                                object.color = $root.google.type.Color.toObject(message.color, options);
                            if (message.score != null && message.hasOwnProperty("score"))
                                object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                            if (message.pixelFraction != null && message.hasOwnProperty("pixelFraction"))
                                object.pixelFraction = options.json && !isFinite(message.pixelFraction) ? String(message.pixelFraction) : message.pixelFraction;
                            return object;
                        };
    
                        /**
                         * Converts this ColorInfo to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ColorInfo.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ColorInfo
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ColorInfo
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ColorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ColorInfo";
                        };
    
                        return ColorInfo;
                    })();
    
                    v1p4beta1.DominantColorsAnnotation = (function() {
    
                        /**
                         * Properties of a DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IDominantColorsAnnotation
                         * @property {Array.<google.cloud.vision.v1p4beta1.IColorInfo>|null} [colors] DominantColorsAnnotation colors
                         */
    
                        /**
                         * Constructs a new DominantColorsAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a DominantColorsAnnotation.
                         * @implements IDominantColorsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         */
                        function DominantColorsAnnotation(properties) {
                            this.colors = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DominantColorsAnnotation colors.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IColorInfo>} colors
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @instance
                         */
                        DominantColorsAnnotation.prototype.colors = $util.emptyArray;
    
                        /**
                         * Creates a new DominantColorsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.DominantColorsAnnotation} DominantColorsAnnotation instance
                         */
                        DominantColorsAnnotation.create = function create(properties) {
                            return new DominantColorsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.colors != null && message.colors.length)
                                for (var i = 0; i < message.colors.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ColorInfo.encode(message.colors[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DominantColorsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.DominantColorsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation} message DominantColorsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DominantColorsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.colors && message.colors.length))
                                            message.colors = [];
                                        message.colors.push($root.google.cloud.vision.v1p4beta1.ColorInfo.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DominantColorsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DominantColorsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DominantColorsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DominantColorsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.colors != null && message.hasOwnProperty("colors")) {
                                if (!Array.isArray(message.colors))
                                    return "colors: array expected";
                                for (var i = 0; i < message.colors.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ColorInfo.verify(message.colors[i]);
                                    if (error)
                                        return "colors." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a DominantColorsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.DominantColorsAnnotation} DominantColorsAnnotation
                         */
                        DominantColorsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation();
                            if (object.colors) {
                                if (!Array.isArray(object.colors))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.DominantColorsAnnotation.colors: array expected");
                                message.colors = [];
                                for (var i = 0; i < object.colors.length; ++i) {
                                    if (typeof object.colors[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.DominantColorsAnnotation.colors: object expected");
                                    message.colors[i] = $root.google.cloud.vision.v1p4beta1.ColorInfo.fromObject(object.colors[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DominantColorsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.DominantColorsAnnotation} message DominantColorsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DominantColorsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.colors = [];
                            if (message.colors && message.colors.length) {
                                object.colors = [];
                                for (var j = 0; j < message.colors.length; ++j)
                                    object.colors[j] = $root.google.cloud.vision.v1p4beta1.ColorInfo.toObject(message.colors[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this DominantColorsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DominantColorsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DominantColorsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.DominantColorsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DominantColorsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.DominantColorsAnnotation";
                        };
    
                        return DominantColorsAnnotation;
                    })();
    
                    v1p4beta1.ImageProperties = (function() {
    
                        /**
                         * Properties of an ImageProperties.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImageProperties
                         * @property {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation|null} [dominantColors] ImageProperties dominantColors
                         */
    
                        /**
                         * Constructs a new ImageProperties.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImageProperties.
                         * @implements IImageProperties
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImageProperties=} [properties] Properties to set
                         */
                        function ImageProperties(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageProperties dominantColors.
                         * @member {google.cloud.vision.v1p4beta1.IDominantColorsAnnotation|null|undefined} dominantColors
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @instance
                         */
                        ImageProperties.prototype.dominantColors = null;
    
                        /**
                         * Creates a new ImageProperties instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageProperties=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImageProperties} ImageProperties instance
                         */
                        ImageProperties.create = function create(properties) {
                            return new ImageProperties(properties);
                        };
    
                        /**
                         * Encodes the specified ImageProperties message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageProperties.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.dominantColors != null && Object.hasOwnProperty.call(message, "dominantColors"))
                                $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.encode(message.dominantColors, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageProperties message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageProperties.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageProperties} message ImageProperties message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageProperties.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImageProperties();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.dominantColors = $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageProperties message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImageProperties} ImageProperties
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageProperties.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageProperties message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageProperties.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors")) {
                                var error = $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.verify(message.dominantColors);
                                if (error)
                                    return "dominantColors." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageProperties message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImageProperties} ImageProperties
                         */
                        ImageProperties.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImageProperties)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImageProperties();
                            if (object.dominantColors != null) {
                                if (typeof object.dominantColors !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageProperties.dominantColors: object expected");
                                message.dominantColors = $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.fromObject(object.dominantColors);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageProperties message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImageProperties} message ImageProperties
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageProperties.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.dominantColors = null;
                            if (message.dominantColors != null && message.hasOwnProperty("dominantColors"))
                                object.dominantColors = $root.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.toObject(message.dominantColors, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageProperties to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageProperties.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageProperties
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImageProperties
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageProperties.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImageProperties";
                        };
    
                        return ImageProperties;
                    })();
    
                    v1p4beta1.CropHint = (function() {
    
                        /**
                         * Properties of a CropHint.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICropHint
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] CropHint boundingPoly
                         * @property {number|null} [confidence] CropHint confidence
                         * @property {number|null} [importanceFraction] CropHint importanceFraction
                         */
    
                        /**
                         * Constructs a new CropHint.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CropHint.
                         * @implements ICropHint
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICropHint=} [properties] Properties to set
                         */
                        function CropHint(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHint boundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.boundingPoly = null;
    
                        /**
                         * CropHint confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.confidence = 0;
    
                        /**
                         * CropHint importanceFraction.
                         * @member {number} importanceFraction
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @instance
                         */
                        CropHint.prototype.importanceFraction = 0;
    
                        /**
                         * Creates a new CropHint instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHint=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CropHint} CropHint instance
                         */
                        CropHint.create = function create(properties) {
                            return new CropHint(properties);
                        };
    
                        /**
                         * Encodes the specified CropHint message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHint.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                            if (message.importanceFraction != null && Object.hasOwnProperty.call(message, "importanceFraction"))
                                writer.uint32(/* id 3, wireType 5 =*/29).float(message.importanceFraction);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHint message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHint.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHint} message CropHint message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHint.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CropHint();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                case 3: {
                                        message.importanceFraction = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHint message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CropHint} CropHint
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHint.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHint message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHint.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                if (typeof message.importanceFraction !== "number")
                                    return "importanceFraction: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a CropHint message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CropHint} CropHint
                         */
                        CropHint.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CropHint)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CropHint();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CropHint.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            if (object.importanceFraction != null)
                                message.importanceFraction = Number(object.importanceFraction);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHint message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CropHint} message CropHint
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHint.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.boundingPoly = null;
                                object.confidence = 0;
                                object.importanceFraction = 0;
                            }
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            if (message.importanceFraction != null && message.hasOwnProperty("importanceFraction"))
                                object.importanceFraction = options.json && !isFinite(message.importanceFraction) ? String(message.importanceFraction) : message.importanceFraction;
                            return object;
                        };
    
                        /**
                         * Converts this CropHint to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHint.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHint
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CropHint
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHint.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CropHint";
                        };
    
                        return CropHint;
                    })();
    
                    v1p4beta1.CropHintsAnnotation = (function() {
    
                        /**
                         * Properties of a CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICropHintsAnnotation
                         * @property {Array.<google.cloud.vision.v1p4beta1.ICropHint>|null} [cropHints] CropHintsAnnotation cropHints
                         */
    
                        /**
                         * Constructs a new CropHintsAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CropHintsAnnotation.
                         * @implements ICropHintsAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsAnnotation=} [properties] Properties to set
                         */
                        function CropHintsAnnotation(properties) {
                            this.cropHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsAnnotation cropHints.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ICropHint>} cropHints
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @instance
                         */
                        CropHintsAnnotation.prototype.cropHints = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsAnnotation} CropHintsAnnotation instance
                         */
                        CropHintsAnnotation.create = function create(properties) {
                            return new CropHintsAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.cropHints != null && message.cropHints.length)
                                for (var i = 0; i < message.cropHints.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.CropHint.encode(message.cropHints[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHintsAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsAnnotation} message CropHintsAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.cropHints && message.cropHints.length))
                                            message.cropHints = [];
                                        message.cropHints.push($root.google.cloud.vision.v1p4beta1.CropHint.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsAnnotation} CropHintsAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.cropHints != null && message.hasOwnProperty("cropHints")) {
                                if (!Array.isArray(message.cropHints))
                                    return "cropHints: array expected";
                                for (var i = 0; i < message.cropHints.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.CropHint.verify(message.cropHints[i]);
                                    if (error)
                                        return "cropHints." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsAnnotation} CropHintsAnnotation
                         */
                        CropHintsAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation();
                            if (object.cropHints) {
                                if (!Array.isArray(object.cropHints))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CropHintsAnnotation.cropHints: array expected");
                                message.cropHints = [];
                                for (var i = 0; i < object.cropHints.length; ++i) {
                                    if (typeof object.cropHints[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.CropHintsAnnotation.cropHints: object expected");
                                    message.cropHints[i] = $root.google.cloud.vision.v1p4beta1.CropHint.fromObject(object.cropHints[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CropHintsAnnotation} message CropHintsAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.cropHints = [];
                            if (message.cropHints && message.cropHints.length) {
                                object.cropHints = [];
                                for (var j = 0; j < message.cropHints.length; ++j)
                                    object.cropHints[j] = $root.google.cloud.vision.v1p4beta1.CropHint.toObject(message.cropHints[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CropHintsAnnotation";
                        };
    
                        return CropHintsAnnotation;
                    })();
    
                    v1p4beta1.CropHintsParams = (function() {
    
                        /**
                         * Properties of a CropHintsParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICropHintsParams
                         * @property {Array.<number>|null} [aspectRatios] CropHintsParams aspectRatios
                         */
    
                        /**
                         * Constructs a new CropHintsParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CropHintsParams.
                         * @implements ICropHintsParams
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsParams=} [properties] Properties to set
                         */
                        function CropHintsParams(properties) {
                            this.aspectRatios = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CropHintsParams aspectRatios.
                         * @member {Array.<number>} aspectRatios
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @instance
                         */
                        CropHintsParams.prototype.aspectRatios = $util.emptyArray;
    
                        /**
                         * Creates a new CropHintsParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsParams} CropHintsParams instance
                         */
                        CropHintsParams.create = function create(properties) {
                            return new CropHintsParams(properties);
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHintsParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.aspectRatios != null && message.aspectRatios.length) {
                                writer.uint32(/* id 1, wireType 2 =*/10).fork();
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    writer.float(message.aspectRatios[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CropHintsParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CropHintsParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICropHintsParams} message CropHintsParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CropHintsParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CropHintsParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.aspectRatios && message.aspectRatios.length))
                                            message.aspectRatios = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.aspectRatios.push(reader.float());
                                        } else
                                            message.aspectRatios.push(reader.float());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CropHintsParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsParams} CropHintsParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CropHintsParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CropHintsParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CropHintsParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.aspectRatios != null && message.hasOwnProperty("aspectRatios")) {
                                if (!Array.isArray(message.aspectRatios))
                                    return "aspectRatios: array expected";
                                for (var i = 0; i < message.aspectRatios.length; ++i)
                                    if (typeof message.aspectRatios[i] !== "number")
                                        return "aspectRatios: number[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a CropHintsParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CropHintsParams} CropHintsParams
                         */
                        CropHintsParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CropHintsParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CropHintsParams();
                            if (object.aspectRatios) {
                                if (!Array.isArray(object.aspectRatios))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CropHintsParams.aspectRatios: array expected");
                                message.aspectRatios = [];
                                for (var i = 0; i < object.aspectRatios.length; ++i)
                                    message.aspectRatios[i] = Number(object.aspectRatios[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CropHintsParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CropHintsParams} message CropHintsParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CropHintsParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.aspectRatios = [];
                            if (message.aspectRatios && message.aspectRatios.length) {
                                object.aspectRatios = [];
                                for (var j = 0; j < message.aspectRatios.length; ++j)
                                    object.aspectRatios[j] = options.json && !isFinite(message.aspectRatios[j]) ? String(message.aspectRatios[j]) : message.aspectRatios[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this CropHintsParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CropHintsParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CropHintsParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CropHintsParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CropHintsParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CropHintsParams";
                        };
    
                        return CropHintsParams;
                    })();
    
                    v1p4beta1.WebDetectionParams = (function() {
    
                        /**
                         * Properties of a WebDetectionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IWebDetectionParams
                         * @property {boolean|null} [includeGeoResults] WebDetectionParams includeGeoResults
                         */
    
                        /**
                         * Constructs a new WebDetectionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a WebDetectionParams.
                         * @implements IWebDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IWebDetectionParams=} [properties] Properties to set
                         */
                        function WebDetectionParams(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetectionParams includeGeoResults.
                         * @member {boolean} includeGeoResults
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @instance
                         */
                        WebDetectionParams.prototype.includeGeoResults = false;
    
                        /**
                         * Creates a new WebDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.WebDetectionParams} WebDetectionParams instance
                         */
                        WebDetectionParams.create = function create(properties) {
                            return new WebDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.includeGeoResults != null && Object.hasOwnProperty.call(message, "includeGeoResults"))
                                writer.uint32(/* id 2, wireType 0 =*/16).bool(message.includeGeoResults);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetectionParams} message WebDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.includeGeoResults = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.WebDetectionParams} WebDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                if (typeof message.includeGeoResults !== "boolean")
                                    return "includeGeoResults: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a WebDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.WebDetectionParams} WebDetectionParams
                         */
                        WebDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.WebDetectionParams();
                            if (object.includeGeoResults != null)
                                message.includeGeoResults = Boolean(object.includeGeoResults);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.WebDetectionParams} message WebDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.includeGeoResults = false;
                            if (message.includeGeoResults != null && message.hasOwnProperty("includeGeoResults"))
                                object.includeGeoResults = message.includeGeoResults;
                            return object;
                        };
    
                        /**
                         * Converts this WebDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.WebDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetectionParams";
                        };
    
                        return WebDetectionParams;
                    })();
    
                    v1p4beta1.TextDetectionParams = (function() {
    
                        /**
                         * Properties of a TextDetectionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ITextDetectionParams
                         * @property {boolean|null} [enableTextDetectionConfidenceScore] TextDetectionParams enableTextDetectionConfidenceScore
                         * @property {Array.<string>|null} [advancedOcrOptions] TextDetectionParams advancedOcrOptions
                         */
    
                        /**
                         * Constructs a new TextDetectionParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a TextDetectionParams.
                         * @implements ITextDetectionParams
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ITextDetectionParams=} [properties] Properties to set
                         */
                        function TextDetectionParams(properties) {
                            this.advancedOcrOptions = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextDetectionParams enableTextDetectionConfidenceScore.
                         * @member {boolean} enableTextDetectionConfidenceScore
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.enableTextDetectionConfidenceScore = false;
    
                        /**
                         * TextDetectionParams advancedOcrOptions.
                         * @member {Array.<string>} advancedOcrOptions
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @instance
                         */
                        TextDetectionParams.prototype.advancedOcrOptions = $util.emptyArray;
    
                        /**
                         * Creates a new TextDetectionParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextDetectionParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.TextDetectionParams} TextDetectionParams instance
                         */
                        TextDetectionParams.create = function create(properties) {
                            return new TextDetectionParams(properties);
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextDetectionParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.enableTextDetectionConfidenceScore != null && Object.hasOwnProperty.call(message, "enableTextDetectionConfidenceScore"))
                                writer.uint32(/* id 9, wireType 0 =*/72).bool(message.enableTextDetectionConfidenceScore);
                            if (message.advancedOcrOptions != null && message.advancedOcrOptions.length)
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    writer.uint32(/* id 11, wireType 2 =*/90).string(message.advancedOcrOptions[i]);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextDetectionParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextDetectionParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextDetectionParams} message TextDetectionParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextDetectionParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.TextDetectionParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.enableTextDetectionConfidenceScore = reader.bool();
                                        break;
                                    }
                                case 11: {
                                        if (!(message.advancedOcrOptions && message.advancedOcrOptions.length))
                                            message.advancedOcrOptions = [];
                                        message.advancedOcrOptions.push(reader.string());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextDetectionParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.TextDetectionParams} TextDetectionParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextDetectionParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextDetectionParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextDetectionParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                if (typeof message.enableTextDetectionConfidenceScore !== "boolean")
                                    return "enableTextDetectionConfidenceScore: boolean expected";
                            if (message.advancedOcrOptions != null && message.hasOwnProperty("advancedOcrOptions")) {
                                if (!Array.isArray(message.advancedOcrOptions))
                                    return "advancedOcrOptions: array expected";
                                for (var i = 0; i < message.advancedOcrOptions.length; ++i)
                                    if (!$util.isString(message.advancedOcrOptions[i]))
                                        return "advancedOcrOptions: string[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates a TextDetectionParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.TextDetectionParams} TextDetectionParams
                         */
                        TextDetectionParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.TextDetectionParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.TextDetectionParams();
                            if (object.enableTextDetectionConfidenceScore != null)
                                message.enableTextDetectionConfidenceScore = Boolean(object.enableTextDetectionConfidenceScore);
                            if (object.advancedOcrOptions) {
                                if (!Array.isArray(object.advancedOcrOptions))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.TextDetectionParams.advancedOcrOptions: array expected");
                                message.advancedOcrOptions = [];
                                for (var i = 0; i < object.advancedOcrOptions.length; ++i)
                                    message.advancedOcrOptions[i] = String(object.advancedOcrOptions[i]);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextDetectionParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.TextDetectionParams} message TextDetectionParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextDetectionParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.advancedOcrOptions = [];
                            if (options.defaults)
                                object.enableTextDetectionConfidenceScore = false;
                            if (message.enableTextDetectionConfidenceScore != null && message.hasOwnProperty("enableTextDetectionConfidenceScore"))
                                object.enableTextDetectionConfidenceScore = message.enableTextDetectionConfidenceScore;
                            if (message.advancedOcrOptions && message.advancedOcrOptions.length) {
                                object.advancedOcrOptions = [];
                                for (var j = 0; j < message.advancedOcrOptions.length; ++j)
                                    object.advancedOcrOptions[j] = message.advancedOcrOptions[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this TextDetectionParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextDetectionParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextDetectionParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.TextDetectionParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextDetectionParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.TextDetectionParams";
                        };
    
                        return TextDetectionParams;
                    })();
    
                    v1p4beta1.ImageContext = (function() {
    
                        /**
                         * Properties of an ImageContext.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImageContext
                         * @property {google.cloud.vision.v1p4beta1.ILatLongRect|null} [latLongRect] ImageContext latLongRect
                         * @property {Array.<string>|null} [languageHints] ImageContext languageHints
                         * @property {google.cloud.vision.v1p4beta1.ICropHintsParams|null} [cropHintsParams] ImageContext cropHintsParams
                         * @property {google.cloud.vision.v1p4beta1.IFaceRecognitionParams|null} [faceRecognitionParams] ImageContext faceRecognitionParams
                         * @property {google.cloud.vision.v1p4beta1.IProductSearchParams|null} [productSearchParams] ImageContext productSearchParams
                         * @property {google.cloud.vision.v1p4beta1.IWebDetectionParams|null} [webDetectionParams] ImageContext webDetectionParams
                         * @property {google.cloud.vision.v1p4beta1.ITextDetectionParams|null} [textDetectionParams] ImageContext textDetectionParams
                         */
    
                        /**
                         * Constructs a new ImageContext.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImageContext.
                         * @implements IImageContext
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImageContext=} [properties] Properties to set
                         */
                        function ImageContext(properties) {
                            this.languageHints = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageContext latLongRect.
                         * @member {google.cloud.vision.v1p4beta1.ILatLongRect|null|undefined} latLongRect
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.latLongRect = null;
    
                        /**
                         * ImageContext languageHints.
                         * @member {Array.<string>} languageHints
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.languageHints = $util.emptyArray;
    
                        /**
                         * ImageContext cropHintsParams.
                         * @member {google.cloud.vision.v1p4beta1.ICropHintsParams|null|undefined} cropHintsParams
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.cropHintsParams = null;
    
                        /**
                         * ImageContext faceRecognitionParams.
                         * @member {google.cloud.vision.v1p4beta1.IFaceRecognitionParams|null|undefined} faceRecognitionParams
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.faceRecognitionParams = null;
    
                        /**
                         * ImageContext productSearchParams.
                         * @member {google.cloud.vision.v1p4beta1.IProductSearchParams|null|undefined} productSearchParams
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.productSearchParams = null;
    
                        /**
                         * ImageContext webDetectionParams.
                         * @member {google.cloud.vision.v1p4beta1.IWebDetectionParams|null|undefined} webDetectionParams
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.webDetectionParams = null;
    
                        /**
                         * ImageContext textDetectionParams.
                         * @member {google.cloud.vision.v1p4beta1.ITextDetectionParams|null|undefined} textDetectionParams
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         */
                        ImageContext.prototype.textDetectionParams = null;
    
                        /**
                         * Creates a new ImageContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImageContext} ImageContext instance
                         */
                        ImageContext.create = function create(properties) {
                            return new ImageContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageContext message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.latLongRect != null && Object.hasOwnProperty.call(message, "latLongRect"))
                                $root.google.cloud.vision.v1p4beta1.LatLongRect.encode(message.latLongRect, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.languageHints != null && message.languageHints.length)
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageHints[i]);
                            if (message.cropHintsParams != null && Object.hasOwnProperty.call(message, "cropHintsParams"))
                                $root.google.cloud.vision.v1p4beta1.CropHintsParams.encode(message.cropHintsParams, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.productSearchParams != null && Object.hasOwnProperty.call(message, "productSearchParams"))
                                $root.google.cloud.vision.v1p4beta1.ProductSearchParams.encode(message.productSearchParams, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.webDetectionParams != null && Object.hasOwnProperty.call(message, "webDetectionParams"))
                                $root.google.cloud.vision.v1p4beta1.WebDetectionParams.encode(message.webDetectionParams, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.faceRecognitionParams != null && Object.hasOwnProperty.call(message, "faceRecognitionParams"))
                                $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams.encode(message.faceRecognitionParams, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim();
                            if (message.textDetectionParams != null && Object.hasOwnProperty.call(message, "textDetectionParams"))
                                $root.google.cloud.vision.v1p4beta1.TextDetectionParams.encode(message.textDetectionParams, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageContext} message ImageContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImageContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.latLongRect = $root.google.cloud.vision.v1p4beta1.LatLongRect.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.languageHints && message.languageHints.length))
                                            message.languageHints = [];
                                        message.languageHints.push(reader.string());
                                        break;
                                    }
                                case 4: {
                                        message.cropHintsParams = $root.google.cloud.vision.v1p4beta1.CropHintsParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 10: {
                                        message.faceRecognitionParams = $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        message.productSearchParams = $root.google.cloud.vision.v1p4beta1.ProductSearchParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.webDetectionParams = $root.google.cloud.vision.v1p4beta1.WebDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 12: {
                                        message.textDetectionParams = $root.google.cloud.vision.v1p4beta1.TextDetectionParams.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImageContext} ImageContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect")) {
                                var error = $root.google.cloud.vision.v1p4beta1.LatLongRect.verify(message.latLongRect);
                                if (error)
                                    return "latLongRect." + error;
                            }
                            if (message.languageHints != null && message.hasOwnProperty("languageHints")) {
                                if (!Array.isArray(message.languageHints))
                                    return "languageHints: array expected";
                                for (var i = 0; i < message.languageHints.length; ++i)
                                    if (!$util.isString(message.languageHints[i]))
                                        return "languageHints: string[] expected";
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams")) {
                                var error = $root.google.cloud.vision.v1p4beta1.CropHintsParams.verify(message.cropHintsParams);
                                if (error)
                                    return "cropHintsParams." + error;
                            }
                            if (message.faceRecognitionParams != null && message.hasOwnProperty("faceRecognitionParams")) {
                                var error = $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams.verify(message.faceRecognitionParams);
                                if (error)
                                    return "faceRecognitionParams." + error;
                            }
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ProductSearchParams.verify(message.productSearchParams);
                                if (error)
                                    return "productSearchParams." + error;
                            }
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p4beta1.WebDetectionParams.verify(message.webDetectionParams);
                                if (error)
                                    return "webDetectionParams." + error;
                            }
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextDetectionParams.verify(message.textDetectionParams);
                                if (error)
                                    return "textDetectionParams." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImageContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImageContext} ImageContext
                         */
                        ImageContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImageContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImageContext();
                            if (object.latLongRect != null) {
                                if (typeof object.latLongRect !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.latLongRect: object expected");
                                message.latLongRect = $root.google.cloud.vision.v1p4beta1.LatLongRect.fromObject(object.latLongRect);
                            }
                            if (object.languageHints) {
                                if (!Array.isArray(object.languageHints))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.languageHints: array expected");
                                message.languageHints = [];
                                for (var i = 0; i < object.languageHints.length; ++i)
                                    message.languageHints[i] = String(object.languageHints[i]);
                            }
                            if (object.cropHintsParams != null) {
                                if (typeof object.cropHintsParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.cropHintsParams: object expected");
                                message.cropHintsParams = $root.google.cloud.vision.v1p4beta1.CropHintsParams.fromObject(object.cropHintsParams);
                            }
                            if (object.faceRecognitionParams != null) {
                                if (typeof object.faceRecognitionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.faceRecognitionParams: object expected");
                                message.faceRecognitionParams = $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams.fromObject(object.faceRecognitionParams);
                            }
                            if (object.productSearchParams != null) {
                                if (typeof object.productSearchParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.productSearchParams: object expected");
                                message.productSearchParams = $root.google.cloud.vision.v1p4beta1.ProductSearchParams.fromObject(object.productSearchParams);
                            }
                            if (object.webDetectionParams != null) {
                                if (typeof object.webDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.webDetectionParams: object expected");
                                message.webDetectionParams = $root.google.cloud.vision.v1p4beta1.WebDetectionParams.fromObject(object.webDetectionParams);
                            }
                            if (object.textDetectionParams != null) {
                                if (typeof object.textDetectionParams !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImageContext.textDetectionParams: object expected");
                                message.textDetectionParams = $root.google.cloud.vision.v1p4beta1.TextDetectionParams.fromObject(object.textDetectionParams);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImageContext} message ImageContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.languageHints = [];
                            if (options.defaults) {
                                object.latLongRect = null;
                                object.cropHintsParams = null;
                                object.productSearchParams = null;
                                object.webDetectionParams = null;
                                object.faceRecognitionParams = null;
                                object.textDetectionParams = null;
                            }
                            if (message.latLongRect != null && message.hasOwnProperty("latLongRect"))
                                object.latLongRect = $root.google.cloud.vision.v1p4beta1.LatLongRect.toObject(message.latLongRect, options);
                            if (message.languageHints && message.languageHints.length) {
                                object.languageHints = [];
                                for (var j = 0; j < message.languageHints.length; ++j)
                                    object.languageHints[j] = message.languageHints[j];
                            }
                            if (message.cropHintsParams != null && message.hasOwnProperty("cropHintsParams"))
                                object.cropHintsParams = $root.google.cloud.vision.v1p4beta1.CropHintsParams.toObject(message.cropHintsParams, options);
                            if (message.productSearchParams != null && message.hasOwnProperty("productSearchParams"))
                                object.productSearchParams = $root.google.cloud.vision.v1p4beta1.ProductSearchParams.toObject(message.productSearchParams, options);
                            if (message.webDetectionParams != null && message.hasOwnProperty("webDetectionParams"))
                                object.webDetectionParams = $root.google.cloud.vision.v1p4beta1.WebDetectionParams.toObject(message.webDetectionParams, options);
                            if (message.faceRecognitionParams != null && message.hasOwnProperty("faceRecognitionParams"))
                                object.faceRecognitionParams = $root.google.cloud.vision.v1p4beta1.FaceRecognitionParams.toObject(message.faceRecognitionParams, options);
                            if (message.textDetectionParams != null && message.hasOwnProperty("textDetectionParams"))
                                object.textDetectionParams = $root.google.cloud.vision.v1p4beta1.TextDetectionParams.toObject(message.textDetectionParams, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImageContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImageContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImageContext";
                        };
    
                        return ImageContext;
                    })();
    
                    v1p4beta1.AnnotateImageRequest = (function() {
    
                        /**
                         * Properties of an AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAnnotateImageRequest
                         * @property {google.cloud.vision.v1p4beta1.IImage|null} [image] AnnotateImageRequest image
                         * @property {Array.<google.cloud.vision.v1p4beta1.IFeature>|null} [features] AnnotateImageRequest features
                         * @property {google.cloud.vision.v1p4beta1.IImageContext|null} [imageContext] AnnotateImageRequest imageContext
                         */
    
                        /**
                         * Constructs a new AnnotateImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AnnotateImageRequest.
                         * @implements IAnnotateImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageRequest=} [properties] Properties to set
                         */
                        function AnnotateImageRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageRequest image.
                         * @member {google.cloud.vision.v1p4beta1.IImage|null|undefined} image
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.image = null;
    
                        /**
                         * AnnotateImageRequest features.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateImageRequest imageContext.
                         * @member {google.cloud.vision.v1p4beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @instance
                         */
                        AnnotateImageRequest.prototype.imageContext = null;
    
                        /**
                         * Creates a new AnnotateImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageRequest} AnnotateImageRequest instance
                         */
                        AnnotateImageRequest.create = function create(properties) {
                            return new AnnotateImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                $root.google.cloud.vision.v1p4beta1.Image.encode(message.image, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p4beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageRequest} message AnnotateImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.image = $root.google.cloud.vision.v1p4beta1.Image.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p4beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageRequest} AnnotateImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.image != null && message.hasOwnProperty("image")) {
                                var error = $root.google.cloud.vision.v1p4beta1.Image.verify(message.image);
                                if (error)
                                    return "image." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageRequest} AnnotateImageRequest
                         */
                        AnnotateImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest();
                            if (object.image != null) {
                                if (typeof object.image !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageRequest.image: object expected");
                                message.image = $root.google.cloud.vision.v1p4beta1.Image.fromObject(object.image);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p4beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.fromObject(object.imageContext);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AnnotateImageRequest} message AnnotateImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.image = null;
                                object.imageContext = null;
                            }
                            if (message.image != null && message.hasOwnProperty("image"))
                                object.image = $root.google.cloud.vision.v1p4beta1.Image.toObject(message.image, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p4beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.toObject(message.imageContext, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AnnotateImageRequest";
                        };
    
                        return AnnotateImageRequest;
                    })();
    
                    v1p4beta1.ImageAnnotationContext = (function() {
    
                        /**
                         * Properties of an ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImageAnnotationContext
                         * @property {string|null} [uri] ImageAnnotationContext uri
                         * @property {number|null} [pageNumber] ImageAnnotationContext pageNumber
                         */
    
                        /**
                         * Constructs a new ImageAnnotationContext.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImageAnnotationContext.
                         * @implements IImageAnnotationContext
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImageAnnotationContext=} [properties] Properties to set
                         */
                        function ImageAnnotationContext(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImageAnnotationContext uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.uri = "";
    
                        /**
                         * ImageAnnotationContext pageNumber.
                         * @member {number} pageNumber
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @instance
                         */
                        ImageAnnotationContext.prototype.pageNumber = 0;
    
                        /**
                         * Creates a new ImageAnnotationContext instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageAnnotationContext=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImageAnnotationContext} ImageAnnotationContext instance
                         */
                        ImageAnnotationContext.create = function create(properties) {
                            return new ImageAnnotationContext(properties);
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            if (message.pageNumber != null && Object.hasOwnProperty.call(message, "pageNumber"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageNumber);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImageAnnotationContext message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImageAnnotationContext.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImageAnnotationContext} message ImageAnnotationContext message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImageAnnotationContext.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageNumber = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImageAnnotationContext message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImageAnnotationContext} ImageAnnotationContext
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImageAnnotationContext.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImageAnnotationContext message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImageAnnotationContext.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                if (!$util.isInteger(message.pageNumber))
                                    return "pageNumber: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImageAnnotationContext message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImageAnnotationContext} ImageAnnotationContext
                         */
                        ImageAnnotationContext.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.pageNumber != null)
                                message.pageNumber = object.pageNumber | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImageAnnotationContext message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImageAnnotationContext} message ImageAnnotationContext
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImageAnnotationContext.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.uri = "";
                                object.pageNumber = 0;
                            }
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.pageNumber != null && message.hasOwnProperty("pageNumber"))
                                object.pageNumber = message.pageNumber;
                            return object;
                        };
    
                        /**
                         * Converts this ImageAnnotationContext to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImageAnnotationContext.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImageAnnotationContext
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImageAnnotationContext
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImageAnnotationContext.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImageAnnotationContext";
                        };
    
                        return ImageAnnotationContext;
                    })();
    
                    v1p4beta1.AnnotateImageResponse = (function() {
    
                        /**
                         * Properties of an AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAnnotateImageResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IFaceAnnotation>|null} [faceAnnotations] AnnotateImageResponse faceAnnotations
                         * @property {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>|null} [landmarkAnnotations] AnnotateImageResponse landmarkAnnotations
                         * @property {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>|null} [logoAnnotations] AnnotateImageResponse logoAnnotations
                         * @property {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>|null} [labelAnnotations] AnnotateImageResponse labelAnnotations
                         * @property {Array.<google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation>|null} [localizedObjectAnnotations] AnnotateImageResponse localizedObjectAnnotations
                         * @property {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>|null} [textAnnotations] AnnotateImageResponse textAnnotations
                         * @property {google.cloud.vision.v1p4beta1.ITextAnnotation|null} [fullTextAnnotation] AnnotateImageResponse fullTextAnnotation
                         * @property {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation|null} [safeSearchAnnotation] AnnotateImageResponse safeSearchAnnotation
                         * @property {google.cloud.vision.v1p4beta1.IImageProperties|null} [imagePropertiesAnnotation] AnnotateImageResponse imagePropertiesAnnotation
                         * @property {google.cloud.vision.v1p4beta1.ICropHintsAnnotation|null} [cropHintsAnnotation] AnnotateImageResponse cropHintsAnnotation
                         * @property {google.cloud.vision.v1p4beta1.IWebDetection|null} [webDetection] AnnotateImageResponse webDetection
                         * @property {google.cloud.vision.v1p4beta1.IProductSearchResults|null} [productSearchResults] AnnotateImageResponse productSearchResults
                         * @property {google.rpc.IStatus|null} [error] AnnotateImageResponse error
                         * @property {google.cloud.vision.v1p4beta1.IImageAnnotationContext|null} [context] AnnotateImageResponse context
                         */
    
                        /**
                         * Constructs a new AnnotateImageResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AnnotateImageResponse.
                         * @implements IAnnotateImageResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageResponse=} [properties] Properties to set
                         */
                        function AnnotateImageResponse(properties) {
                            this.faceAnnotations = [];
                            this.landmarkAnnotations = [];
                            this.logoAnnotations = [];
                            this.labelAnnotations = [];
                            this.localizedObjectAnnotations = [];
                            this.textAnnotations = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateImageResponse faceAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IFaceAnnotation>} faceAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.faceAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse landmarkAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>} landmarkAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.landmarkAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse logoAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>} logoAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.logoAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse labelAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>} labelAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.labelAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse localizedObjectAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ILocalizedObjectAnnotation>} localizedObjectAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.localizedObjectAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse textAnnotations.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IEntityAnnotation>} textAnnotations
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.textAnnotations = $util.emptyArray;
    
                        /**
                         * AnnotateImageResponse fullTextAnnotation.
                         * @member {google.cloud.vision.v1p4beta1.ITextAnnotation|null|undefined} fullTextAnnotation
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.fullTextAnnotation = null;
    
                        /**
                         * AnnotateImageResponse safeSearchAnnotation.
                         * @member {google.cloud.vision.v1p4beta1.ISafeSearchAnnotation|null|undefined} safeSearchAnnotation
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.safeSearchAnnotation = null;
    
                        /**
                         * AnnotateImageResponse imagePropertiesAnnotation.
                         * @member {google.cloud.vision.v1p4beta1.IImageProperties|null|undefined} imagePropertiesAnnotation
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.imagePropertiesAnnotation = null;
    
                        /**
                         * AnnotateImageResponse cropHintsAnnotation.
                         * @member {google.cloud.vision.v1p4beta1.ICropHintsAnnotation|null|undefined} cropHintsAnnotation
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.cropHintsAnnotation = null;
    
                        /**
                         * AnnotateImageResponse webDetection.
                         * @member {google.cloud.vision.v1p4beta1.IWebDetection|null|undefined} webDetection
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.webDetection = null;
    
                        /**
                         * AnnotateImageResponse productSearchResults.
                         * @member {google.cloud.vision.v1p4beta1.IProductSearchResults|null|undefined} productSearchResults
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.productSearchResults = null;
    
                        /**
                         * AnnotateImageResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.error = null;
    
                        /**
                         * AnnotateImageResponse context.
                         * @member {google.cloud.vision.v1p4beta1.IImageAnnotationContext|null|undefined} context
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         */
                        AnnotateImageResponse.prototype.context = null;
    
                        /**
                         * Creates a new AnnotateImageResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageResponse} AnnotateImageResponse instance
                         */
                        AnnotateImageResponse.create = function create(properties) {
                            return new AnnotateImageResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.faceAnnotations != null && message.faceAnnotations.length)
                                for (var i = 0; i < message.faceAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.FaceAnnotation.encode(message.faceAnnotations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.landmarkAnnotations != null && message.landmarkAnnotations.length)
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.EntityAnnotation.encode(message.landmarkAnnotations[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.logoAnnotations != null && message.logoAnnotations.length)
                                for (var i = 0; i < message.logoAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.EntityAnnotation.encode(message.logoAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.labelAnnotations != null && message.labelAnnotations.length)
                                for (var i = 0; i < message.labelAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.EntityAnnotation.encode(message.labelAnnotations[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.textAnnotations != null && message.textAnnotations.length)
                                for (var i = 0; i < message.textAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.EntityAnnotation.encode(message.textAnnotations[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.safeSearchAnnotation != null && Object.hasOwnProperty.call(message, "safeSearchAnnotation"))
                                $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.encode(message.safeSearchAnnotation, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.imagePropertiesAnnotation != null && Object.hasOwnProperty.call(message, "imagePropertiesAnnotation"))
                                $root.google.cloud.vision.v1p4beta1.ImageProperties.encode(message.imagePropertiesAnnotation, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            if (message.cropHintsAnnotation != null && Object.hasOwnProperty.call(message, "cropHintsAnnotation"))
                                $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation.encode(message.cropHintsAnnotation, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                            if (message.fullTextAnnotation != null && Object.hasOwnProperty.call(message, "fullTextAnnotation"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.encode(message.fullTextAnnotation, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                            if (message.webDetection != null && Object.hasOwnProperty.call(message, "webDetection"))
                                $root.google.cloud.vision.v1p4beta1.WebDetection.encode(message.webDetection, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim();
                            if (message.productSearchResults != null && Object.hasOwnProperty.call(message, "productSearchResults"))
                                $root.google.cloud.vision.v1p4beta1.ProductSearchResults.encode(message.productSearchResults, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim();
                            if (message.context != null && Object.hasOwnProperty.call(message, "context"))
                                $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext.encode(message.context, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                            if (message.localizedObjectAnnotations != null && message.localizedObjectAnnotations.length)
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.encode(message.localizedObjectAnnotations[i], writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateImageResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateImageResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateImageResponse} message AnnotateImageResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateImageResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.faceAnnotations && message.faceAnnotations.length))
                                            message.faceAnnotations = [];
                                        message.faceAnnotations.push($root.google.cloud.vision.v1p4beta1.FaceAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.landmarkAnnotations && message.landmarkAnnotations.length))
                                            message.landmarkAnnotations = [];
                                        message.landmarkAnnotations.push($root.google.cloud.vision.v1p4beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.logoAnnotations && message.logoAnnotations.length))
                                            message.logoAnnotations = [];
                                        message.logoAnnotations.push($root.google.cloud.vision.v1p4beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.labelAnnotations && message.labelAnnotations.length))
                                            message.labelAnnotations = [];
                                        message.labelAnnotations.push($root.google.cloud.vision.v1p4beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 22: {
                                        if (!(message.localizedObjectAnnotations && message.localizedObjectAnnotations.length))
                                            message.localizedObjectAnnotations = [];
                                        message.localizedObjectAnnotations.push($root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        if (!(message.textAnnotations && message.textAnnotations.length))
                                            message.textAnnotations = [];
                                        message.textAnnotations.push($root.google.cloud.vision.v1p4beta1.EntityAnnotation.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 12: {
                                        message.fullTextAnnotation = $root.google.cloud.vision.v1p4beta1.TextAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.safeSearchAnnotation = $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 8: {
                                        message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p4beta1.ImageProperties.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 11: {
                                        message.cropHintsAnnotation = $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 13: {
                                        message.webDetection = $root.google.cloud.vision.v1p4beta1.WebDetection.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 14: {
                                        message.productSearchResults = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 9: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 21: {
                                        message.context = $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateImageResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageResponse} AnnotateImageResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateImageResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateImageResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateImageResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.faceAnnotations != null && message.hasOwnProperty("faceAnnotations")) {
                                if (!Array.isArray(message.faceAnnotations))
                                    return "faceAnnotations: array expected";
                                for (var i = 0; i < message.faceAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.verify(message.faceAnnotations[i]);
                                    if (error)
                                        return "faceAnnotations." + error;
                                }
                            }
                            if (message.landmarkAnnotations != null && message.hasOwnProperty("landmarkAnnotations")) {
                                if (!Array.isArray(message.landmarkAnnotations))
                                    return "landmarkAnnotations: array expected";
                                for (var i = 0; i < message.landmarkAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.verify(message.landmarkAnnotations[i]);
                                    if (error)
                                        return "landmarkAnnotations." + error;
                                }
                            }
                            if (message.logoAnnotations != null && message.hasOwnProperty("logoAnnotations")) {
                                if (!Array.isArray(message.logoAnnotations))
                                    return "logoAnnotations: array expected";
                                for (var i = 0; i < message.logoAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.verify(message.logoAnnotations[i]);
                                    if (error)
                                        return "logoAnnotations." + error;
                                }
                            }
                            if (message.labelAnnotations != null && message.hasOwnProperty("labelAnnotations")) {
                                if (!Array.isArray(message.labelAnnotations))
                                    return "labelAnnotations: array expected";
                                for (var i = 0; i < message.labelAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.verify(message.labelAnnotations[i]);
                                    if (error)
                                        return "labelAnnotations." + error;
                                }
                            }
                            if (message.localizedObjectAnnotations != null && message.hasOwnProperty("localizedObjectAnnotations")) {
                                if (!Array.isArray(message.localizedObjectAnnotations))
                                    return "localizedObjectAnnotations: array expected";
                                for (var i = 0; i < message.localizedObjectAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.verify(message.localizedObjectAnnotations[i]);
                                    if (error)
                                        return "localizedObjectAnnotations." + error;
                                }
                            }
                            if (message.textAnnotations != null && message.hasOwnProperty("textAnnotations")) {
                                if (!Array.isArray(message.textAnnotations))
                                    return "textAnnotations: array expected";
                                for (var i = 0; i < message.textAnnotations.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.verify(message.textAnnotations[i]);
                                    if (error)
                                        return "textAnnotations." + error;
                                }
                            }
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.verify(message.fullTextAnnotation);
                                if (error)
                                    return "fullTextAnnotation." + error;
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation")) {
                                var error = $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.verify(message.safeSearchAnnotation);
                                if (error)
                                    return "safeSearchAnnotation." + error;
                            }
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageProperties.verify(message.imagePropertiesAnnotation);
                                if (error)
                                    return "imagePropertiesAnnotation." + error;
                            }
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation")) {
                                var error = $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation.verify(message.cropHintsAnnotation);
                                if (error)
                                    return "cropHintsAnnotation." + error;
                            }
                            if (message.webDetection != null && message.hasOwnProperty("webDetection")) {
                                var error = $root.google.cloud.vision.v1p4beta1.WebDetection.verify(message.webDetection);
                                if (error)
                                    return "webDetection." + error;
                            }
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.verify(message.productSearchResults);
                                if (error)
                                    return "productSearchResults." + error;
                            }
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            if (message.context != null && message.hasOwnProperty("context")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext.verify(message.context);
                                if (error)
                                    return "context." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateImageResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateImageResponse} AnnotateImageResponse
                         */
                        AnnotateImageResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse();
                            if (object.faceAnnotations) {
                                if (!Array.isArray(object.faceAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.faceAnnotations: array expected");
                                message.faceAnnotations = [];
                                for (var i = 0; i < object.faceAnnotations.length; ++i) {
                                    if (typeof object.faceAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.faceAnnotations: object expected");
                                    message.faceAnnotations[i] = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.fromObject(object.faceAnnotations[i]);
                                }
                            }
                            if (object.landmarkAnnotations) {
                                if (!Array.isArray(object.landmarkAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.landmarkAnnotations: array expected");
                                message.landmarkAnnotations = [];
                                for (var i = 0; i < object.landmarkAnnotations.length; ++i) {
                                    if (typeof object.landmarkAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.landmarkAnnotations: object expected");
                                    message.landmarkAnnotations[i] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.fromObject(object.landmarkAnnotations[i]);
                                }
                            }
                            if (object.logoAnnotations) {
                                if (!Array.isArray(object.logoAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.logoAnnotations: array expected");
                                message.logoAnnotations = [];
                                for (var i = 0; i < object.logoAnnotations.length; ++i) {
                                    if (typeof object.logoAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.logoAnnotations: object expected");
                                    message.logoAnnotations[i] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.fromObject(object.logoAnnotations[i]);
                                }
                            }
                            if (object.labelAnnotations) {
                                if (!Array.isArray(object.labelAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.labelAnnotations: array expected");
                                message.labelAnnotations = [];
                                for (var i = 0; i < object.labelAnnotations.length; ++i) {
                                    if (typeof object.labelAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.labelAnnotations: object expected");
                                    message.labelAnnotations[i] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.fromObject(object.labelAnnotations[i]);
                                }
                            }
                            if (object.localizedObjectAnnotations) {
                                if (!Array.isArray(object.localizedObjectAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.localizedObjectAnnotations: array expected");
                                message.localizedObjectAnnotations = [];
                                for (var i = 0; i < object.localizedObjectAnnotations.length; ++i) {
                                    if (typeof object.localizedObjectAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.localizedObjectAnnotations: object expected");
                                    message.localizedObjectAnnotations[i] = $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.fromObject(object.localizedObjectAnnotations[i]);
                                }
                            }
                            if (object.textAnnotations) {
                                if (!Array.isArray(object.textAnnotations))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.textAnnotations: array expected");
                                message.textAnnotations = [];
                                for (var i = 0; i < object.textAnnotations.length; ++i) {
                                    if (typeof object.textAnnotations[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.textAnnotations: object expected");
                                    message.textAnnotations[i] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.fromObject(object.textAnnotations[i]);
                                }
                            }
                            if (object.fullTextAnnotation != null) {
                                if (typeof object.fullTextAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.fullTextAnnotation: object expected");
                                message.fullTextAnnotation = $root.google.cloud.vision.v1p4beta1.TextAnnotation.fromObject(object.fullTextAnnotation);
                            }
                            if (object.safeSearchAnnotation != null) {
                                if (typeof object.safeSearchAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.safeSearchAnnotation: object expected");
                                message.safeSearchAnnotation = $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.fromObject(object.safeSearchAnnotation);
                            }
                            if (object.imagePropertiesAnnotation != null) {
                                if (typeof object.imagePropertiesAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.imagePropertiesAnnotation: object expected");
                                message.imagePropertiesAnnotation = $root.google.cloud.vision.v1p4beta1.ImageProperties.fromObject(object.imagePropertiesAnnotation);
                            }
                            if (object.cropHintsAnnotation != null) {
                                if (typeof object.cropHintsAnnotation !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.cropHintsAnnotation: object expected");
                                message.cropHintsAnnotation = $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation.fromObject(object.cropHintsAnnotation);
                            }
                            if (object.webDetection != null) {
                                if (typeof object.webDetection !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.webDetection: object expected");
                                message.webDetection = $root.google.cloud.vision.v1p4beta1.WebDetection.fromObject(object.webDetection);
                            }
                            if (object.productSearchResults != null) {
                                if (typeof object.productSearchResults !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.productSearchResults: object expected");
                                message.productSearchResults = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.fromObject(object.productSearchResults);
                            }
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            if (object.context != null) {
                                if (typeof object.context !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateImageResponse.context: object expected");
                                message.context = $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext.fromObject(object.context);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateImageResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AnnotateImageResponse} message AnnotateImageResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateImageResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.faceAnnotations = [];
                                object.landmarkAnnotations = [];
                                object.logoAnnotations = [];
                                object.labelAnnotations = [];
                                object.textAnnotations = [];
                                object.localizedObjectAnnotations = [];
                            }
                            if (options.defaults) {
                                object.safeSearchAnnotation = null;
                                object.imagePropertiesAnnotation = null;
                                object.error = null;
                                object.cropHintsAnnotation = null;
                                object.fullTextAnnotation = null;
                                object.webDetection = null;
                                object.productSearchResults = null;
                                object.context = null;
                            }
                            if (message.faceAnnotations && message.faceAnnotations.length) {
                                object.faceAnnotations = [];
                                for (var j = 0; j < message.faceAnnotations.length; ++j)
                                    object.faceAnnotations[j] = $root.google.cloud.vision.v1p4beta1.FaceAnnotation.toObject(message.faceAnnotations[j], options);
                            }
                            if (message.landmarkAnnotations && message.landmarkAnnotations.length) {
                                object.landmarkAnnotations = [];
                                for (var j = 0; j < message.landmarkAnnotations.length; ++j)
                                    object.landmarkAnnotations[j] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.toObject(message.landmarkAnnotations[j], options);
                            }
                            if (message.logoAnnotations && message.logoAnnotations.length) {
                                object.logoAnnotations = [];
                                for (var j = 0; j < message.logoAnnotations.length; ++j)
                                    object.logoAnnotations[j] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.toObject(message.logoAnnotations[j], options);
                            }
                            if (message.labelAnnotations && message.labelAnnotations.length) {
                                object.labelAnnotations = [];
                                for (var j = 0; j < message.labelAnnotations.length; ++j)
                                    object.labelAnnotations[j] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.toObject(message.labelAnnotations[j], options);
                            }
                            if (message.textAnnotations && message.textAnnotations.length) {
                                object.textAnnotations = [];
                                for (var j = 0; j < message.textAnnotations.length; ++j)
                                    object.textAnnotations[j] = $root.google.cloud.vision.v1p4beta1.EntityAnnotation.toObject(message.textAnnotations[j], options);
                            }
                            if (message.safeSearchAnnotation != null && message.hasOwnProperty("safeSearchAnnotation"))
                                object.safeSearchAnnotation = $root.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.toObject(message.safeSearchAnnotation, options);
                            if (message.imagePropertiesAnnotation != null && message.hasOwnProperty("imagePropertiesAnnotation"))
                                object.imagePropertiesAnnotation = $root.google.cloud.vision.v1p4beta1.ImageProperties.toObject(message.imagePropertiesAnnotation, options);
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            if (message.cropHintsAnnotation != null && message.hasOwnProperty("cropHintsAnnotation"))
                                object.cropHintsAnnotation = $root.google.cloud.vision.v1p4beta1.CropHintsAnnotation.toObject(message.cropHintsAnnotation, options);
                            if (message.fullTextAnnotation != null && message.hasOwnProperty("fullTextAnnotation"))
                                object.fullTextAnnotation = $root.google.cloud.vision.v1p4beta1.TextAnnotation.toObject(message.fullTextAnnotation, options);
                            if (message.webDetection != null && message.hasOwnProperty("webDetection"))
                                object.webDetection = $root.google.cloud.vision.v1p4beta1.WebDetection.toObject(message.webDetection, options);
                            if (message.productSearchResults != null && message.hasOwnProperty("productSearchResults"))
                                object.productSearchResults = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.toObject(message.productSearchResults, options);
                            if (message.context != null && message.hasOwnProperty("context"))
                                object.context = $root.google.cloud.vision.v1p4beta1.ImageAnnotationContext.toObject(message.context, options);
                            if (message.localizedObjectAnnotations && message.localizedObjectAnnotations.length) {
                                object.localizedObjectAnnotations = [];
                                for (var j = 0; j < message.localizedObjectAnnotations.length; ++j)
                                    object.localizedObjectAnnotations[j] = $root.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.toObject(message.localizedObjectAnnotations[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateImageResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateImageResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateImageResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateImageResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateImageResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AnnotateImageResponse";
                        };
    
                        return AnnotateImageResponse;
                    })();
    
                    v1p4beta1.BatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageRequest>|null} [requests] BatchAnnotateImagesRequest requests
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BatchAnnotateImagesRequest.
                         * @implements IBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @instance
                         */
                        BatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest instance
                         */
                        BatchAnnotateImagesRequest.create = function create(properties) {
                            return new BatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesRequest} message BatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} BatchAnnotateImagesRequest
                         */
                        BatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest} message BatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest";
                        };
    
                        return BatchAnnotateImagesRequest;
                    })();
    
                    v1p4beta1.BatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBatchAnnotateImagesResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageResponse>|null} [responses] BatchAnnotateImagesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BatchAnnotateImagesResponse.
                         * @implements IBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateImagesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateImagesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @instance
                         */
                        BatchAnnotateImagesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse instance
                         */
                        BatchAnnotateImagesResponse.create = function create(properties) {
                            return new BatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateImagesResponse} message BatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} BatchAnnotateImagesResponse
                         */
                        BatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse} message BatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse";
                        };
    
                        return BatchAnnotateImagesResponse;
                    })();
    
                    v1p4beta1.AnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAnnotateFileRequest
                         * @property {google.cloud.vision.v1p4beta1.IInputConfig|null} [inputConfig] AnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1p4beta1.IFeature>|null} [features] AnnotateFileRequest features
                         * @property {google.cloud.vision.v1p4beta1.IImageContext|null} [imageContext] AnnotateFileRequest imageContext
                         * @property {Array.<number>|null} [pages] AnnotateFileRequest pages
                         */
    
                        /**
                         * Constructs a new AnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AnnotateFileRequest.
                         * @implements IAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AnnotateFileRequest(properties) {
                            this.features = [];
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1p4beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AnnotateFileRequest pages.
                         * @member {Array.<number>} pages
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @instance
                         */
                        AnnotateFileRequest.prototype.pages = $util.emptyArray;
    
                        /**
                         * Creates a new AnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileRequest} AnnotateFileRequest instance
                         */
                        AnnotateFileRequest.create = function create(properties) {
                            return new AnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileRequest} message AnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p4beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p4beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pages != null && message.pages.length) {
                                writer.uint32(/* id 4, wireType 2 =*/34).fork();
                                for (var i = 0; i < message.pages.length; ++i)
                                    writer.int32(message.pages[i]);
                                writer.ldelim();
                            }
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileRequest} message AnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileRequest} AnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p4beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        if ((tag & 7) === 2) {
                                            var end2 = reader.uint32() + reader.pos;
                                            while (reader.pos < end2)
                                                message.pages.push(reader.int32());
                                        } else
                                            message.pages.push(reader.int32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileRequest} AnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i)
                                    if (!$util.isInteger(message.pages[i]))
                                        return "pages: integer[] expected";
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileRequest} AnnotateFileRequest
                         */
                        AnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p4beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileRequest.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i)
                                    message.pages[i] = object.pages[i] | 0;
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AnnotateFileRequest} message AnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.features = [];
                                object.pages = [];
                            }
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p4beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.toObject(message.imageContext, options);
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = message.pages[j];
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AnnotateFileRequest";
                        };
    
                        return AnnotateFileRequest;
                    })();
    
                    v1p4beta1.AnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAnnotateFileResponse
                         * @property {google.cloud.vision.v1p4beta1.IInputConfig|null} [inputConfig] AnnotateFileResponse inputConfig
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageResponse>|null} [responses] AnnotateFileResponse responses
                         * @property {number|null} [totalPages] AnnotateFileResponse totalPages
                         * @property {google.rpc.IStatus|null} [error] AnnotateFileResponse error
                         */
    
                        /**
                         * Constructs a new AnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AnnotateFileResponse.
                         * @implements IAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AnnotateFileResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AnnotateFileResponse inputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.inputConfig = null;
    
                        /**
                         * AnnotateFileResponse responses.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageResponse>} responses
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * AnnotateFileResponse totalPages.
                         * @member {number} totalPages
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.totalPages = 0;
    
                        /**
                         * AnnotateFileResponse error.
                         * @member {google.rpc.IStatus|null|undefined} error
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @instance
                         */
                        AnnotateFileResponse.prototype.error = null;
    
                        /**
                         * Creates a new AnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileResponse} AnnotateFileResponse instance
                         */
                        AnnotateFileResponse.create = function create(properties) {
                            return new AnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p4beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.encode(message.responses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.totalPages != null && Object.hasOwnProperty.call(message, "totalPages"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.totalPages);
                            if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                                $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAnnotateFileResponse} message AnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.totalPages = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileResponse} AnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            if (message.totalPages != null && message.hasOwnProperty("totalPages"))
                                if (!$util.isInteger(message.totalPages))
                                    return "totalPages: integer expected";
                            if (message.error != null && message.hasOwnProperty("error")) {
                                var error = $root.google.rpc.Status.verify(message.error);
                                if (error)
                                    return "error." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AnnotateFileResponse} AnnotateFileResponse
                         */
                        AnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileResponse.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.fromObject(object.responses[i]);
                                }
                            }
                            if (object.totalPages != null)
                                message.totalPages = object.totalPages | 0;
                            if (object.error != null) {
                                if (typeof object.error !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AnnotateFileResponse.error: object expected");
                                message.error = $root.google.rpc.Status.fromObject(object.error);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AnnotateFileResponse} message AnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.totalPages = 0;
                                object.error = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p4beta1.AnnotateImageResponse.toObject(message.responses[j], options);
                            }
                            if (message.totalPages != null && message.hasOwnProperty("totalPages"))
                                object.totalPages = message.totalPages;
                            if (message.error != null && message.hasOwnProperty("error"))
                                object.error = $root.google.rpc.Status.toObject(message.error, options);
                            return object;
                        };
    
                        /**
                         * Converts this AnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AnnotateFileResponse";
                        };
    
                        return AnnotateFileResponse;
                    })();
    
                    v1p4beta1.BatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of a BatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateFileRequest>|null} [requests] BatchAnnotateFilesRequest requests
                         */
    
                        /**
                         * Constructs a new BatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BatchAnnotateFilesRequest.
                         * @implements IBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function BatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @instance
                         */
                        BatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest instance
                         */
                        BatchAnnotateFilesRequest.create = function create(properties) {
                            return new BatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest} message BatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesRequest} message BatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p4beta1.AnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} BatchAnnotateFilesRequest
                         */
                        BatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest} message BatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p4beta1.AnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest";
                        };
    
                        return BatchAnnotateFilesRequest;
                    })();
    
                    v1p4beta1.BatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of a BatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateFileResponse>|null} [responses] BatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new BatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BatchAnnotateFilesResponse.
                         * @implements IBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function BatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @instance
                         */
                        BatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new BatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse instance
                         */
                        BatchAnnotateFilesResponse.create = function create(properties) {
                            return new BatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesResponse} message BatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchAnnotateFilesResponse} message BatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p4beta1.AnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} BatchAnnotateFilesResponse
                         */
                        BatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse} message BatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p4beta1.AnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this BatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse";
                        };
    
                        return BatchAnnotateFilesResponse;
                    })();
    
                    v1p4beta1.AsyncAnnotateFileRequest = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncAnnotateFileRequest
                         * @property {google.cloud.vision.v1p4beta1.IInputConfig|null} [inputConfig] AsyncAnnotateFileRequest inputConfig
                         * @property {Array.<google.cloud.vision.v1p4beta1.IFeature>|null} [features] AsyncAnnotateFileRequest features
                         * @property {google.cloud.vision.v1p4beta1.IImageContext|null} [imageContext] AsyncAnnotateFileRequest imageContext
                         * @property {google.cloud.vision.v1p4beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileRequest outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncAnnotateFileRequest.
                         * @implements IAsyncAnnotateFileRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileRequest(properties) {
                            this.features = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileRequest inputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.inputConfig = null;
    
                        /**
                         * AsyncAnnotateFileRequest features.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IFeature>} features
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.features = $util.emptyArray;
    
                        /**
                         * AsyncAnnotateFileRequest imageContext.
                         * @member {google.cloud.vision.v1p4beta1.IImageContext|null|undefined} imageContext
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.imageContext = null;
    
                        /**
                         * AsyncAnnotateFileRequest outputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @instance
                         */
                        AsyncAnnotateFileRequest.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest instance
                         */
                        AsyncAnnotateFileRequest.create = function create(properties) {
                            return new AsyncAnnotateFileRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p4beta1.InputConfig.encode(message.inputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.features != null && message.features.length)
                                for (var i = 0; i < message.features.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Feature.encode(message.features[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.imageContext != null && Object.hasOwnProperty.call(message, "imageContext"))
                                $root.google.cloud.vision.v1p4beta1.ImageContext.encode(message.imageContext, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p4beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest} message AsyncAnnotateFileRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        if (!(message.features && message.features.length))
                                            message.features = [];
                                        message.features.push($root.google.cloud.vision.v1p4beta1.Feature.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.InputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            if (message.features != null && message.hasOwnProperty("features")) {
                                if (!Array.isArray(message.features))
                                    return "features: array expected";
                                for (var i = 0; i < message.features.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Feature.verify(message.features[i]);
                                    if (error)
                                        return "features." + error;
                                }
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImageContext.verify(message.imageContext);
                                if (error)
                                    return "imageContext." + error;
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} AsyncAnnotateFileRequest
                         */
                        AsyncAnnotateFileRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest();
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.fromObject(object.inputConfig);
                            }
                            if (object.features) {
                                if (!Array.isArray(object.features))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.features: array expected");
                                message.features = [];
                                for (var i = 0; i < object.features.length; ++i) {
                                    if (typeof object.features[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.features: object expected");
                                    message.features[i] = $root.google.cloud.vision.v1p4beta1.Feature.fromObject(object.features[i]);
                                }
                            }
                            if (object.imageContext != null) {
                                if (typeof object.imageContext !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.imageContext: object expected");
                                message.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.fromObject(object.imageContext);
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest} message AsyncAnnotateFileRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.features = [];
                            if (options.defaults) {
                                object.inputConfig = null;
                                object.imageContext = null;
                                object.outputConfig = null;
                            }
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p4beta1.InputConfig.toObject(message.inputConfig, options);
                            if (message.features && message.features.length) {
                                object.features = [];
                                for (var j = 0; j < message.features.length; ++j)
                                    object.features[j] = $root.google.cloud.vision.v1p4beta1.Feature.toObject(message.features[j], options);
                            }
                            if (message.imageContext != null && message.hasOwnProperty("imageContext"))
                                object.imageContext = $root.google.cloud.vision.v1p4beta1.ImageContext.toObject(message.imageContext, options);
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest";
                        };
    
                        return AsyncAnnotateFileRequest;
                    })();
    
                    v1p4beta1.AsyncAnnotateFileResponse = (function() {
    
                        /**
                         * Properties of an AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncAnnotateFileResponse
                         * @property {google.cloud.vision.v1p4beta1.IOutputConfig|null} [outputConfig] AsyncAnnotateFileResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncAnnotateFileResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncAnnotateFileResponse.
                         * @implements IAsyncAnnotateFileResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         */
                        function AsyncAnnotateFileResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncAnnotateFileResponse outputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @instance
                         */
                        AsyncAnnotateFileResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncAnnotateFileResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse instance
                         */
                        AsyncAnnotateFileResponse.create = function create(properties) {
                            return new AsyncAnnotateFileResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p4beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncAnnotateFileResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse} message AsyncAnnotateFileResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncAnnotateFileResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncAnnotateFileResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncAnnotateFileResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncAnnotateFileResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncAnnotateFileResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncAnnotateFileResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} AsyncAnnotateFileResponse
                         */
                        AsyncAnnotateFileResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncAnnotateFileResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse} message AsyncAnnotateFileResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncAnnotateFileResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncAnnotateFileResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncAnnotateFileResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncAnnotateFileResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncAnnotateFileResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse";
                        };
    
                        return AsyncAnnotateFileResponse;
                    })();
    
                    v1p4beta1.AsyncBatchAnnotateImagesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncBatchAnnotateImagesRequest
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageRequest>|null} [requests] AsyncBatchAnnotateImagesRequest requests
                         * @property {google.cloud.vision.v1p4beta1.IOutputConfig|null} [outputConfig] AsyncBatchAnnotateImagesRequest outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncBatchAnnotateImagesRequest.
                         * @implements IAsyncBatchAnnotateImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateImagesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateImagesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAnnotateImageRequest>} requests
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * AsyncBatchAnnotateImagesRequest outputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncBatchAnnotateImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest instance
                         */
                        AsyncBatchAnnotateImagesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p4beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} AsyncBatchAnnotateImagesRequest
                         */
                        AsyncBatchAnnotateImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.fromObject(object.requests[i]);
                                }
                            }
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest} message AsyncBatchAnnotateImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p4beta1.AnnotateImageRequest.toObject(message.requests[j], options);
                            }
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest";
                        };
    
                        return AsyncBatchAnnotateImagesRequest;
                    })();
    
                    v1p4beta1.AsyncBatchAnnotateImagesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncBatchAnnotateImagesResponse
                         * @property {google.cloud.vision.v1p4beta1.IOutputConfig|null} [outputConfig] AsyncBatchAnnotateImagesResponse outputConfig
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncBatchAnnotateImagesResponse.
                         * @implements IAsyncBatchAnnotateImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateImagesResponse(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateImagesResponse outputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IOutputConfig|null|undefined} outputConfig
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateImagesResponse.prototype.outputConfig = null;
    
                        /**
                         * Creates a new AsyncBatchAnnotateImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse instance
                         */
                        AsyncBatchAnnotateImagesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.outputConfig != null && Object.hasOwnProperty.call(message, "outputConfig"))
                                $root.google.cloud.vision.v1p4beta1.OutputConfig.encode(message.outputConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.OutputConfig.verify(message.outputConfig);
                                if (error)
                                    return "outputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} AsyncBatchAnnotateImagesResponse
                         */
                        AsyncBatchAnnotateImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse();
                            if (object.outputConfig != null) {
                                if (typeof object.outputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse.outputConfig: object expected");
                                message.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.fromObject(object.outputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse} message AsyncBatchAnnotateImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.outputConfig = null;
                            if (message.outputConfig != null && message.hasOwnProperty("outputConfig"))
                                object.outputConfig = $root.google.cloud.vision.v1p4beta1.OutputConfig.toObject(message.outputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse";
                        };
    
                        return AsyncBatchAnnotateImagesResponse;
                    })();
    
                    v1p4beta1.AsyncBatchAnnotateFilesRequest = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncBatchAnnotateFilesRequest
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest>|null} [requests] AsyncBatchAnnotateFilesRequest requests
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesRequest.
                         * @implements IAsyncBatchAnnotateFilesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesRequest(properties) {
                            this.requests = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesRequest requests.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAsyncAnnotateFileRequest>} requests
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.requests = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest instance
                         */
                        AsyncBatchAnnotateFilesRequest.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.requests != null && message.requests.length)
                                for (var i = 0; i < message.requests.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.encode(message.requests[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.requests && message.requests.length))
                                            message.requests = [];
                                        message.requests.push($root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.requests != null && message.hasOwnProperty("requests")) {
                                if (!Array.isArray(message.requests))
                                    return "requests: array expected";
                                for (var i = 0; i < message.requests.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.verify(message.requests[i]);
                                    if (error)
                                        return "requests." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} AsyncBatchAnnotateFilesRequest
                         */
                        AsyncBatchAnnotateFilesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest();
                            if (object.requests) {
                                if (!Array.isArray(object.requests))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.requests: array expected");
                                message.requests = [];
                                for (var i = 0; i < object.requests.length; ++i) {
                                    if (typeof object.requests[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest.requests: object expected");
                                    message.requests[i] = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.fromObject(object.requests[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest} message AsyncBatchAnnotateFilesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.requests = [];
                            if (message.requests && message.requests.length) {
                                object.requests = [];
                                for (var j = 0; j < message.requests.length; ++j)
                                    object.requests[j] = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.toObject(message.requests[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest";
                        };
    
                        return AsyncBatchAnnotateFilesRequest;
                    })();
    
                    v1p4beta1.AsyncBatchAnnotateFilesResponse = (function() {
    
                        /**
                         * Properties of an AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAsyncBatchAnnotateFilesResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse>|null} [responses] AsyncBatchAnnotateFilesResponse responses
                         */
    
                        /**
                         * Constructs a new AsyncBatchAnnotateFilesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AsyncBatchAnnotateFilesResponse.
                         * @implements IAsyncBatchAnnotateFilesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         */
                        function AsyncBatchAnnotateFilesResponse(properties) {
                            this.responses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AsyncBatchAnnotateFilesResponse responses.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IAsyncAnnotateFileResponse>} responses
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.responses = $util.emptyArray;
    
                        /**
                         * Creates a new AsyncBatchAnnotateFilesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse instance
                         */
                        AsyncBatchAnnotateFilesResponse.create = function create(properties) {
                            return new AsyncBatchAnnotateFilesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.responses != null && message.responses.length)
                                for (var i = 0; i < message.responses.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.encode(message.responses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AsyncBatchAnnotateFilesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AsyncBatchAnnotateFilesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.responses && message.responses.length))
                                            message.responses = [];
                                        message.responses.push($root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AsyncBatchAnnotateFilesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AsyncBatchAnnotateFilesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AsyncBatchAnnotateFilesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AsyncBatchAnnotateFilesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.responses != null && message.hasOwnProperty("responses")) {
                                if (!Array.isArray(message.responses))
                                    return "responses: array expected";
                                for (var i = 0; i < message.responses.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.verify(message.responses[i]);
                                    if (error)
                                        return "responses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an AsyncBatchAnnotateFilesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} AsyncBatchAnnotateFilesResponse
                         */
                        AsyncBatchAnnotateFilesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse();
                            if (object.responses) {
                                if (!Array.isArray(object.responses))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.responses: array expected");
                                message.responses = [];
                                for (var i = 0; i < object.responses.length; ++i) {
                                    if (typeof object.responses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse.responses: object expected");
                                    message.responses[i] = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.fromObject(object.responses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AsyncBatchAnnotateFilesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse} message AsyncBatchAnnotateFilesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AsyncBatchAnnotateFilesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.responses = [];
                            if (message.responses && message.responses.length) {
                                object.responses = [];
                                for (var j = 0; j < message.responses.length; ++j)
                                    object.responses[j] = $root.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.toObject(message.responses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this AsyncBatchAnnotateFilesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AsyncBatchAnnotateFilesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AsyncBatchAnnotateFilesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AsyncBatchAnnotateFilesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse";
                        };
    
                        return AsyncBatchAnnotateFilesResponse;
                    })();
    
                    v1p4beta1.InputConfig = (function() {
    
                        /**
                         * Properties of an InputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IInputConfig
                         * @property {google.cloud.vision.v1p4beta1.IGcsSource|null} [gcsSource] InputConfig gcsSource
                         * @property {Uint8Array|null} [content] InputConfig content
                         * @property {string|null} [mimeType] InputConfig mimeType
                         */
    
                        /**
                         * Constructs a new InputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an InputConfig.
                         * @implements IInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IInputConfig=} [properties] Properties to set
                         */
                        function InputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * InputConfig gcsSource.
                         * @member {google.cloud.vision.v1p4beta1.IGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.gcsSource = null;
    
                        /**
                         * InputConfig content.
                         * @member {Uint8Array} content
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.content = $util.newBuffer([]);
    
                        /**
                         * InputConfig mimeType.
                         * @member {string} mimeType
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @instance
                         */
                        InputConfig.prototype.mimeType = "";
    
                        /**
                         * Creates a new InputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.InputConfig} InputConfig instance
                         */
                        InputConfig.create = function create(properties) {
                            return new InputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified InputConfig message. Does not implicitly {@link google.cloud.vision.v1p4beta1.InputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1p4beta1.GcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.mimeType != null && Object.hasOwnProperty.call(message, "mimeType"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.mimeType);
                            if (message.content != null && Object.hasOwnProperty.call(message, "content"))
                                writer.uint32(/* id 3, wireType 2 =*/26).bytes(message.content);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified InputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.InputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IInputConfig} message InputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        InputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.InputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1p4beta1.GcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.content = reader.bytes();
                                        break;
                                    }
                                case 2: {
                                        message.mimeType = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an InputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.InputConfig} InputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        InputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an InputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        InputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                var error = $root.google.cloud.vision.v1p4beta1.GcsSource.verify(message.gcsSource);
                                if (error)
                                    return "gcsSource." + error;
                            }
                            if (message.content != null && message.hasOwnProperty("content"))
                                if (!(message.content && typeof message.content.length === "number" || $util.isString(message.content)))
                                    return "content: buffer expected";
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                if (!$util.isString(message.mimeType))
                                    return "mimeType: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an InputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.InputConfig} InputConfig
                         */
                        InputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.InputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.InputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.InputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1p4beta1.GcsSource.fromObject(object.gcsSource);
                            }
                            if (object.content != null)
                                if (typeof object.content === "string")
                                    $util.base64.decode(object.content, message.content = $util.newBuffer($util.base64.length(object.content)), 0);
                                else if (object.content.length >= 0)
                                    message.content = object.content;
                            if (object.mimeType != null)
                                message.mimeType = String(object.mimeType);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an InputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.InputConfig} message InputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        InputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsSource = null;
                                object.mimeType = "";
                                if (options.bytes === String)
                                    object.content = "";
                                else {
                                    object.content = [];
                                    if (options.bytes !== Array)
                                        object.content = $util.newBuffer(object.content);
                                }
                            }
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource"))
                                object.gcsSource = $root.google.cloud.vision.v1p4beta1.GcsSource.toObject(message.gcsSource, options);
                            if (message.mimeType != null && message.hasOwnProperty("mimeType"))
                                object.mimeType = message.mimeType;
                            if (message.content != null && message.hasOwnProperty("content"))
                                object.content = options.bytes === String ? $util.base64.encode(message.content, 0, message.content.length) : options.bytes === Array ? Array.prototype.slice.call(message.content) : message.content;
                            return object;
                        };
    
                        /**
                         * Converts this InputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        InputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for InputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.InputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        InputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.InputConfig";
                        };
    
                        return InputConfig;
                    })();
    
                    v1p4beta1.OutputConfig = (function() {
    
                        /**
                         * Properties of an OutputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IOutputConfig
                         * @property {google.cloud.vision.v1p4beta1.IGcsDestination|null} [gcsDestination] OutputConfig gcsDestination
                         * @property {number|null} [batchSize] OutputConfig batchSize
                         */
    
                        /**
                         * Constructs a new OutputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an OutputConfig.
                         * @implements IOutputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IOutputConfig=} [properties] Properties to set
                         */
                        function OutputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OutputConfig gcsDestination.
                         * @member {google.cloud.vision.v1p4beta1.IGcsDestination|null|undefined} gcsDestination
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.gcsDestination = null;
    
                        /**
                         * OutputConfig batchSize.
                         * @member {number} batchSize
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @instance
                         */
                        OutputConfig.prototype.batchSize = 0;
    
                        /**
                         * Creates a new OutputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOutputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.OutputConfig} OutputConfig instance
                         */
                        OutputConfig.create = function create(properties) {
                            return new OutputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified OutputConfig message. Does not implicitly {@link google.cloud.vision.v1p4beta1.OutputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination"))
                                $root.google.cloud.vision.v1p4beta1.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.batchSize != null && Object.hasOwnProperty.call(message, "batchSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.batchSize);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OutputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.OutputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOutputConfig} message OutputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OutputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.OutputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsDestination = $root.google.cloud.vision.v1p4beta1.GcsDestination.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.batchSize = reader.int32();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OutputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.OutputConfig} OutputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OutputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OutputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OutputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) {
                                var error = $root.google.cloud.vision.v1p4beta1.GcsDestination.verify(message.gcsDestination);
                                if (error)
                                    return "gcsDestination." + error;
                            }
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                if (!$util.isInteger(message.batchSize))
                                    return "batchSize: integer expected";
                            return null;
                        };
    
                        /**
                         * Creates an OutputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.OutputConfig} OutputConfig
                         */
                        OutputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.OutputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.OutputConfig();
                            if (object.gcsDestination != null) {
                                if (typeof object.gcsDestination !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.OutputConfig.gcsDestination: object expected");
                                message.gcsDestination = $root.google.cloud.vision.v1p4beta1.GcsDestination.fromObject(object.gcsDestination);
                            }
                            if (object.batchSize != null)
                                message.batchSize = object.batchSize | 0;
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OutputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.OutputConfig} message OutputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OutputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.gcsDestination = null;
                                object.batchSize = 0;
                            }
                            if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination"))
                                object.gcsDestination = $root.google.cloud.vision.v1p4beta1.GcsDestination.toObject(message.gcsDestination, options);
                            if (message.batchSize != null && message.hasOwnProperty("batchSize"))
                                object.batchSize = message.batchSize;
                            return object;
                        };
    
                        /**
                         * Converts this OutputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OutputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OutputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.OutputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OutputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.OutputConfig";
                        };
    
                        return OutputConfig;
                    })();
    
                    v1p4beta1.GcsSource = (function() {
    
                        /**
                         * Properties of a GcsSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IGcsSource
                         * @property {string|null} [uri] GcsSource uri
                         */
    
                        /**
                         * Constructs a new GcsSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a GcsSource.
                         * @implements IGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IGcsSource=} [properties] Properties to set
                         */
                        function GcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsSource uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @instance
                         */
                        GcsSource.prototype.uri = "";
    
                        /**
                         * Creates a new GcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.GcsSource} GcsSource instance
                         */
                        GcsSource.create = function create(properties) {
                            return new GcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.vision.v1p4beta1.GcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.GcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsSource} message GcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.GcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.GcsSource} GcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.GcsSource} GcsSource
                         */
                        GcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.GcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.GcsSource();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.GcsSource} message GcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.GcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.GcsSource";
                        };
    
                        return GcsSource;
                    })();
    
                    v1p4beta1.GcsDestination = (function() {
    
                        /**
                         * Properties of a GcsDestination.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IGcsDestination
                         * @property {string|null} [uri] GcsDestination uri
                         */
    
                        /**
                         * Constructs a new GcsDestination.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a GcsDestination.
                         * @implements IGcsDestination
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IGcsDestination=} [properties] Properties to set
                         */
                        function GcsDestination(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GcsDestination uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @instance
                         */
                        GcsDestination.prototype.uri = "";
    
                        /**
                         * Creates a new GcsDestination instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsDestination=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.GcsDestination} GcsDestination instance
                         */
                        GcsDestination.create = function create(properties) {
                            return new GcsDestination(properties);
                        };
    
                        /**
                         * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.vision.v1p4beta1.GcsDestination.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.uri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.GcsDestination.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGcsDestination} message GcsDestination message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GcsDestination.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.GcsDestination();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GcsDestination message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.GcsDestination} GcsDestination
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GcsDestination.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GcsDestination message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GcsDestination.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.GcsDestination} GcsDestination
                         */
                        GcsDestination.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.GcsDestination)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.GcsDestination();
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GcsDestination message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.GcsDestination} message GcsDestination
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GcsDestination.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.uri = "";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            return object;
                        };
    
                        /**
                         * Converts this GcsDestination to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GcsDestination.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GcsDestination
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.GcsDestination
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.GcsDestination";
                        };
    
                        return GcsDestination;
                    })();
    
                    v1p4beta1.OperationMetadata = (function() {
    
                        /**
                         * Properties of an OperationMetadata.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IOperationMetadata
                         * @property {google.cloud.vision.v1p4beta1.OperationMetadata.State|null} [state] OperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [createTime] OperationMetadata createTime
                         * @property {google.protobuf.ITimestamp|null} [updateTime] OperationMetadata updateTime
                         */
    
                        /**
                         * Constructs a new OperationMetadata.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an OperationMetadata.
                         * @implements IOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IOperationMetadata=} [properties] Properties to set
                         */
                        function OperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * OperationMetadata state.
                         * @member {google.cloud.vision.v1p4beta1.OperationMetadata.State} state
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.state = 0;
    
                        /**
                         * OperationMetadata createTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} createTime
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.createTime = null;
    
                        /**
                         * OperationMetadata updateTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} updateTime
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @instance
                         */
                        OperationMetadata.prototype.updateTime = null;
    
                        /**
                         * Creates a new OperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.OperationMetadata} OperationMetadata instance
                         */
                        OperationMetadata.create = function create(properties) {
                            return new OperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message. Does not implicitly {@link google.cloud.vision.v1p4beta1.OperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime"))
                                $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime"))
                                $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified OperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.OperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IOperationMetadata} message OperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        OperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.OperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an OperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.OperationMetadata} OperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        OperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an OperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        OperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.createTime != null && message.hasOwnProperty("createTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.createTime);
                                if (error)
                                    return "createTime." + error;
                            }
                            if (message.updateTime != null && message.hasOwnProperty("updateTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.updateTime);
                                if (error)
                                    return "updateTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an OperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.OperationMetadata} OperationMetadata
                         */
                        OperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.OperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.OperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "CREATED":
                            case 1:
                                message.state = 1;
                                break;
                            case "RUNNING":
                            case 2:
                                message.state = 2;
                                break;
                            case "DONE":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.createTime != null) {
                                if (typeof object.createTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.OperationMetadata.createTime: object expected");
                                message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime);
                            }
                            if (object.updateTime != null) {
                                if (typeof object.updateTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.OperationMetadata.updateTime: object expected");
                                message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an OperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.OperationMetadata} message OperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        OperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.createTime = null;
                                object.updateTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.OperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p4beta1.OperationMetadata.State[message.state] : message.state;
                            if (message.createTime != null && message.hasOwnProperty("createTime"))
                                object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options);
                            if (message.updateTime != null && message.hasOwnProperty("updateTime"))
                                object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this OperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        OperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for OperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.OperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        OperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.OperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1p4beta1.OperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} CREATED=1 CREATED value
                         * @property {number} RUNNING=2 RUNNING value
                         * @property {number} DONE=3 DONE value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        OperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "CREATED"] = 1;
                            values[valuesById[2] = "RUNNING"] = 2;
                            values[valuesById[3] = "DONE"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return OperationMetadata;
                    })();
    
                    v1p4beta1.ProductSearchParams = (function() {
    
                        /**
                         * Properties of a ProductSearchParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProductSearchParams
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] ProductSearchParams boundingPoly
                         * @property {string|null} [productSet] ProductSearchParams productSet
                         * @property {Array.<string>|null} [productCategories] ProductSearchParams productCategories
                         * @property {string|null} [filter] ProductSearchParams filter
                         */
    
                        /**
                         * Constructs a new ProductSearchParams.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ProductSearchParams.
                         * @implements IProductSearchParams
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchParams=} [properties] Properties to set
                         */
                        function ProductSearchParams(properties) {
                            this.productCategories = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchParams boundingPoly.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.boundingPoly = null;
    
                        /**
                         * ProductSearchParams productSet.
                         * @member {string} productSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productSet = "";
    
                        /**
                         * ProductSearchParams productCategories.
                         * @member {Array.<string>} productCategories
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.productCategories = $util.emptyArray;
    
                        /**
                         * ProductSearchParams filter.
                         * @member {string} filter
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @instance
                         */
                        ProductSearchParams.prototype.filter = "";
    
                        /**
                         * Creates a new ProductSearchParams instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchParams=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchParams} ProductSearchParams instance
                         */
                        ProductSearchParams.create = function create(properties) {
                            return new ProductSearchParams(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchParams.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.productSet);
                            if (message.productCategories != null && message.productCategories.length)
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    writer.uint32(/* id 7, wireType 2 =*/58).string(message.productCategories[i]);
                            if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
                                writer.uint32(/* id 8, wireType 2 =*/66).string(message.filter);
                            if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchParams message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchParams.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchParams} message ProductSearchParams message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchParams.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSearchParams();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 9: {
                                        message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 6: {
                                        message.productSet = reader.string();
                                        break;
                                    }
                                case 7: {
                                        if (!(message.productCategories && message.productCategories.length))
                                            message.productCategories = [];
                                        message.productCategories.push(reader.string());
                                        break;
                                    }
                                case 8: {
                                        message.filter = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchParams message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchParams} ProductSearchParams
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchParams.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchParams message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchParams.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                if (error)
                                    return "boundingPoly." + error;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                if (!$util.isString(message.productSet))
                                    return "productSet: string expected";
                            if (message.productCategories != null && message.hasOwnProperty("productCategories")) {
                                if (!Array.isArray(message.productCategories))
                                    return "productCategories: array expected";
                                for (var i = 0; i < message.productCategories.length; ++i)
                                    if (!$util.isString(message.productCategories[i]))
                                        return "productCategories: string[] expected";
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                if (!$util.isString(message.filter))
                                    return "filter: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchParams message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchParams} ProductSearchParams
                         */
                        ProductSearchParams.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSearchParams)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ProductSearchParams();
                            if (object.boundingPoly != null) {
                                if (typeof object.boundingPoly !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchParams.boundingPoly: object expected");
                                message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                            }
                            if (object.productSet != null)
                                message.productSet = String(object.productSet);
                            if (object.productCategories) {
                                if (!Array.isArray(object.productCategories))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchParams.productCategories: array expected");
                                message.productCategories = [];
                                for (var i = 0; i < object.productCategories.length; ++i)
                                    message.productCategories[i] = String(object.productCategories[i]);
                            }
                            if (object.filter != null)
                                message.filter = String(object.filter);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchParams message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ProductSearchParams} message ProductSearchParams
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchParams.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productCategories = [];
                            if (options.defaults) {
                                object.productSet = "";
                                object.filter = "";
                                object.boundingPoly = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = message.productSet;
                            if (message.productCategories && message.productCategories.length) {
                                object.productCategories = [];
                                for (var j = 0; j < message.productCategories.length; ++j)
                                    object.productCategories[j] = message.productCategories[j];
                            }
                            if (message.filter != null && message.hasOwnProperty("filter"))
                                object.filter = message.filter;
                            if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchParams to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchParams.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchParams
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchParams
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchParams.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSearchParams";
                        };
    
                        return ProductSearchParams;
                    })();
    
                    v1p4beta1.ProductSearchResults = (function() {
    
                        /**
                         * Properties of a ProductSearchResults.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProductSearchResults
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSearchResults indexTime
                         * @property {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IResult>|null} [results] ProductSearchResults results
                         * @property {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult>|null} [productGroupedResults] ProductSearchResults productGroupedResults
                         */
    
                        /**
                         * Constructs a new ProductSearchResults.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ProductSearchResults.
                         * @implements IProductSearchResults
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchResults=} [properties] Properties to set
                         */
                        function ProductSearchResults(properties) {
                            this.results = [];
                            this.productGroupedResults = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSearchResults indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.indexTime = null;
    
                        /**
                         * ProductSearchResults results.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IResult>} results
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.results = $util.emptyArray;
    
                        /**
                         * ProductSearchResults productGroupedResults.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult>} productGroupedResults
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @instance
                         */
                        ProductSearchResults.prototype.productGroupedResults = $util.emptyArray;
    
                        /**
                         * Creates a new ProductSearchResults instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchResults=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults} ProductSearchResults instance
                         */
                        ProductSearchResults.create = function create(properties) {
                            return new ProductSearchResults(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.results != null && message.results.length)
                                for (var i = 0; i < message.results.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            if (message.productGroupedResults != null && message.productGroupedResults.length)
                                for (var i = 0; i < message.productGroupedResults.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.encode(message.productGroupedResults[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSearchResults message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSearchResults} message ProductSearchResults message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSearchResults.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 5: {
                                        if (!(message.results && message.results.length))
                                            message.results = [];
                                        message.results.push($root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.productGroupedResults && message.productGroupedResults.length))
                                            message.productGroupedResults = [];
                                        message.productGroupedResults.push($root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSearchResults message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults} ProductSearchResults
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSearchResults.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSearchResults message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSearchResults.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.results != null && message.hasOwnProperty("results")) {
                                if (!Array.isArray(message.results))
                                    return "results: array expected";
                                for (var i = 0; i < message.results.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.verify(message.results[i]);
                                    if (error)
                                        return "results." + error;
                                }
                            }
                            if (message.productGroupedResults != null && message.hasOwnProperty("productGroupedResults")) {
                                if (!Array.isArray(message.productGroupedResults))
                                    return "productGroupedResults: array expected";
                                for (var i = 0; i < message.productGroupedResults.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.verify(message.productGroupedResults[i]);
                                    if (error)
                                        return "productGroupedResults." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSearchResults message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults} ProductSearchResults
                         */
                        ProductSearchResults.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSearchResults)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults();
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.results) {
                                if (!Array.isArray(object.results))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.results: array expected");
                                message.results = [];
                                for (var i = 0; i < object.results.length; ++i) {
                                    if (typeof object.results[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.results: object expected");
                                    message.results[i] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.fromObject(object.results[i]);
                                }
                            }
                            if (object.productGroupedResults) {
                                if (!Array.isArray(object.productGroupedResults))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.productGroupedResults: array expected");
                                message.productGroupedResults = [];
                                for (var i = 0; i < object.productGroupedResults.length; ++i) {
                                    if (typeof object.productGroupedResults[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.productGroupedResults: object expected");
                                    message.productGroupedResults[i] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.fromObject(object.productGroupedResults[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSearchResults message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ProductSearchResults} message ProductSearchResults
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSearchResults.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.results = [];
                                object.productGroupedResults = [];
                            }
                            if (options.defaults)
                                object.indexTime = null;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.results && message.results.length) {
                                object.results = [];
                                for (var j = 0; j < message.results.length; ++j)
                                    object.results[j] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.toObject(message.results[j], options);
                            }
                            if (message.productGroupedResults && message.productGroupedResults.length) {
                                object.productGroupedResults = [];
                                for (var j = 0; j < message.productGroupedResults.length; ++j)
                                    object.productGroupedResults[j] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.toObject(message.productGroupedResults[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ProductSearchResults to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSearchResults.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSearchResults
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSearchResults.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSearchResults";
                        };
    
                        ProductSearchResults.Result = (function() {
    
                            /**
                             * Properties of a Result.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @interface IResult
                             * @property {google.cloud.vision.v1p4beta1.IProduct|null} [product] Result product
                             * @property {number|null} [score] Result score
                             * @property {string|null} [image] Result image
                             */
    
                            /**
                             * Constructs a new Result.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @classdesc Represents a Result.
                             * @implements IResult
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IResult=} [properties] Properties to set
                             */
                            function Result(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * Result product.
                             * @member {google.cloud.vision.v1p4beta1.IProduct|null|undefined} product
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.product = null;
    
                            /**
                             * Result score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.score = 0;
    
                            /**
                             * Result image.
                             * @member {string} image
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @instance
                             */
                            Result.prototype.image = "";
    
                            /**
                             * Creates a new Result instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.Result} Result instance
                             */
                            Result.create = function create(properties) {
                                return new Result(properties);
                            };
    
                            /**
                             * Encodes the specified Result message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                    $root.google.cloud.vision.v1p4beta1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.image != null && Object.hasOwnProperty.call(message, "image"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.image);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified Result message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.Result.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IResult} message Result message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            Result.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.product = $root.google.cloud.vision.v1p4beta1.Product.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.image = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a Result message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.Result} Result
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            Result.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a Result message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            Result.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.product != null && message.hasOwnProperty("product")) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Product.verify(message.product);
                                    if (error)
                                        return "product." + error;
                                }
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.image != null && message.hasOwnProperty("image"))
                                    if (!$util.isString(message.image))
                                        return "image: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a Result message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.Result} Result
                             */
                            Result.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result();
                                if (object.product != null) {
                                    if (typeof object.product !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.Result.product: object expected");
                                    message.product = $root.google.cloud.vision.v1p4beta1.Product.fromObject(object.product);
                                }
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.image != null)
                                    message.image = String(object.image);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a Result message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.Result} message Result
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            Result.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.product = null;
                                    object.score = 0;
                                    object.image = "";
                                }
                                if (message.product != null && message.hasOwnProperty("product"))
                                    object.product = $root.google.cloud.vision.v1p4beta1.Product.toObject(message.product, options);
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.image != null && message.hasOwnProperty("image"))
                                    object.image = message.image;
                                return object;
                            };
    
                            /**
                             * Converts this Result to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            Result.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for Result
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.Result
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            Result.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSearchResults.Result";
                            };
    
                            return Result;
                        })();
    
                        ProductSearchResults.ObjectAnnotation = (function() {
    
                            /**
                             * Properties of an ObjectAnnotation.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @interface IObjectAnnotation
                             * @property {string|null} [mid] ObjectAnnotation mid
                             * @property {string|null} [languageCode] ObjectAnnotation languageCode
                             * @property {string|null} [name] ObjectAnnotation name
                             * @property {number|null} [score] ObjectAnnotation score
                             */
    
                            /**
                             * Constructs a new ObjectAnnotation.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @classdesc Represents an ObjectAnnotation.
                             * @implements IObjectAnnotation
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             */
                            function ObjectAnnotation(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * ObjectAnnotation mid.
                             * @member {string} mid
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.mid = "";
    
                            /**
                             * ObjectAnnotation languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.languageCode = "";
    
                            /**
                             * ObjectAnnotation name.
                             * @member {string} name
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.name = "";
    
                            /**
                             * ObjectAnnotation score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             */
                            ObjectAnnotation.prototype.score = 0;
    
                            /**
                             * Creates a new ObjectAnnotation instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation instance
                             */
                            ObjectAnnotation.create = function create(properties) {
                                return new ObjectAnnotation(properties);
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.mid != null && Object.hasOwnProperty.call(message, "mid"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.mid);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.name);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 4, wireType 5 =*/37).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified ObjectAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation} message ObjectAnnotation message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            ObjectAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.mid = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 3: {
                                            message.name = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes an ObjectAnnotation message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            ObjectAnnotation.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies an ObjectAnnotation message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            ObjectAnnotation.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    if (!$util.isString(message.mid))
                                        return "mid: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.name != null && message.hasOwnProperty("name"))
                                    if (!$util.isString(message.name))
                                        return "name: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates an ObjectAnnotation message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} ObjectAnnotation
                             */
                            ObjectAnnotation.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation();
                                if (object.mid != null)
                                    message.mid = String(object.mid);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.name != null)
                                    message.name = String(object.name);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from an ObjectAnnotation message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation} message ObjectAnnotation
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            ObjectAnnotation.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.mid = "";
                                    object.languageCode = "";
                                    object.name = "";
                                    object.score = 0;
                                }
                                if (message.mid != null && message.hasOwnProperty("mid"))
                                    object.mid = message.mid;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.name != null && message.hasOwnProperty("name"))
                                    object.name = message.name;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this ObjectAnnotation to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            ObjectAnnotation.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for ObjectAnnotation
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            ObjectAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation";
                            };
    
                            return ObjectAnnotation;
                        })();
    
                        ProductSearchResults.GroupedResult = (function() {
    
                            /**
                             * Properties of a GroupedResult.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @interface IGroupedResult
                             * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingPoly] GroupedResult boundingPoly
                             * @property {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IResult>|null} [results] GroupedResult results
                             * @property {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation>|null} [objectAnnotations] GroupedResult objectAnnotations
                             */
    
                            /**
                             * Constructs a new GroupedResult.
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults
                             * @classdesc Represents a GroupedResult.
                             * @implements IGroupedResult
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             */
                            function GroupedResult(properties) {
                                this.results = [];
                                this.objectAnnotations = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * GroupedResult boundingPoly.
                             * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingPoly
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.boundingPoly = null;
    
                            /**
                             * GroupedResult results.
                             * @member {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IResult>} results
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.results = $util.emptyArray;
    
                            /**
                             * GroupedResult objectAnnotations.
                             * @member {Array.<google.cloud.vision.v1p4beta1.ProductSearchResults.IObjectAnnotation>} objectAnnotations
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @instance
                             */
                            GroupedResult.prototype.objectAnnotations = $util.emptyArray;
    
                            /**
                             * Creates a new GroupedResult instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} GroupedResult instance
                             */
                            GroupedResult.create = function create(properties) {
                                return new GroupedResult(properties);
                            };
    
                            /**
                             * Encodes the specified GroupedResult message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.boundingPoly != null && Object.hasOwnProperty.call(message, "boundingPoly"))
                                    $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPoly, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.results != null && message.results.length)
                                    for (var i = 0; i < message.results.length; ++i)
                                        $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.encode(message.results[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                if (message.objectAnnotations != null && message.objectAnnotations.length)
                                    for (var i = 0; i < message.objectAnnotations.length; ++i)
                                        $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.encode(message.objectAnnotations[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified GroupedResult message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.IGroupedResult} message GroupedResult message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            GroupedResult.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                            break;
                                        }
                                    case 2: {
                                            if (!(message.results && message.results.length))
                                                message.results = [];
                                            message.results.push($root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 3: {
                                            if (!(message.objectAnnotations && message.objectAnnotations.length))
                                                message.objectAnnotations = [];
                                            message.objectAnnotations.push($root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a GroupedResult message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} GroupedResult
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            GroupedResult.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a GroupedResult message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            GroupedResult.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly")) {
                                    var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPoly);
                                    if (error)
                                        return "boundingPoly." + error;
                                }
                                if (message.results != null && message.hasOwnProperty("results")) {
                                    if (!Array.isArray(message.results))
                                        return "results: array expected";
                                    for (var i = 0; i < message.results.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.verify(message.results[i]);
                                        if (error)
                                            return "results." + error;
                                    }
                                }
                                if (message.objectAnnotations != null && message.hasOwnProperty("objectAnnotations")) {
                                    if (!Array.isArray(message.objectAnnotations))
                                        return "objectAnnotations: array expected";
                                    for (var i = 0; i < message.objectAnnotations.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.verify(message.objectAnnotations[i]);
                                        if (error)
                                            return "objectAnnotations." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a GroupedResult message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} GroupedResult
                             */
                            GroupedResult.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult();
                                if (object.boundingPoly != null) {
                                    if (typeof object.boundingPoly !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.boundingPoly: object expected");
                                    message.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPoly);
                                }
                                if (object.results) {
                                    if (!Array.isArray(object.results))
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.results: array expected");
                                    message.results = [];
                                    for (var i = 0; i < object.results.length; ++i) {
                                        if (typeof object.results[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.results: object expected");
                                        message.results[i] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.fromObject(object.results[i]);
                                    }
                                }
                                if (object.objectAnnotations) {
                                    if (!Array.isArray(object.objectAnnotations))
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.objectAnnotations: array expected");
                                    message.objectAnnotations = [];
                                    for (var i = 0; i < object.objectAnnotations.length; ++i) {
                                        if (typeof object.objectAnnotations[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.objectAnnotations: object expected");
                                        message.objectAnnotations[i] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.fromObject(object.objectAnnotations[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a GroupedResult message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult} message GroupedResult
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            GroupedResult.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.results = [];
                                    object.objectAnnotations = [];
                                }
                                if (options.defaults)
                                    object.boundingPoly = null;
                                if (message.boundingPoly != null && message.hasOwnProperty("boundingPoly"))
                                    object.boundingPoly = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPoly, options);
                                if (message.results && message.results.length) {
                                    object.results = [];
                                    for (var j = 0; j < message.results.length; ++j)
                                        object.results[j] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.toObject(message.results[j], options);
                                }
                                if (message.objectAnnotations && message.objectAnnotations.length) {
                                    object.objectAnnotations = [];
                                    for (var j = 0; j < message.objectAnnotations.length; ++j)
                                        object.objectAnnotations[j] = $root.google.cloud.vision.v1p4beta1.ProductSearchResults.ObjectAnnotation.toObject(message.objectAnnotations[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this GroupedResult to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            GroupedResult.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for GroupedResult
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            GroupedResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult";
                            };
    
                            return GroupedResult;
                        })();
    
                        return ProductSearchResults;
                    })();
    
                    v1p4beta1.ProductSearch = (function() {
    
                        /**
                         * Constructs a new ProductSearch service.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ProductSearch
                         * @extends $protobuf.rpc.Service
                         * @constructor
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         */
                        function ProductSearch(rpcImpl, requestDelimited, responseDelimited) {
                            $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                        }
    
                        (ProductSearch.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ProductSearch;
    
                        /**
                         * Creates new ProductSearch service using the specified rpc implementation.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @static
                         * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                         * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                         * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                         * @returns {ProductSearch} RPC service. Useful where requests and/or responses are streamed.
                         */
                        ProductSearch.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                            return new this(rpcImpl, requestDelimited, responseDelimited);
                        };
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|createProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef CreateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.CreateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProductSet = function createProductSet(request, callback) {
                            return this.rpcCall(createProductSet, $root.google.cloud.vision.v1p4beta1.CreateProductSetRequest, $root.google.cloud.vision.v1p4beta1.ProductSet, request, callback);
                        }, "name", { value: "CreateProductSet" });
    
                        /**
                         * Calls CreateProductSet.
                         * @function createProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest} request CreateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|listProductSets}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef ListProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ListProductSetsResponse} [response] ListProductSetsResponse
                         */
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.ListProductSetsCallback} callback Node-style callback called with the error, if any, and ListProductSetsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductSets = function listProductSets(request, callback) {
                            return this.rpcCall(listProductSets, $root.google.cloud.vision.v1p4beta1.ListProductSetsRequest, $root.google.cloud.vision.v1p4beta1.ListProductSetsResponse, request, callback);
                        }, "name", { value: "ListProductSets" });
    
                        /**
                         * Calls ListProductSets.
                         * @function listProductSets
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest} request ListProductSetsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ListProductSetsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|getProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef GetProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.GetProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProductSet = function getProductSet(request, callback) {
                            return this.rpcCall(getProductSet, $root.google.cloud.vision.v1p4beta1.GetProductSetRequest, $root.google.cloud.vision.v1p4beta1.ProductSet, request, callback);
                        }, "name", { value: "GetProductSet" });
    
                        /**
                         * Calls GetProductSet.
                         * @function getProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest} request GetProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|updateProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef UpdateProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ProductSet} [response] ProductSet
                         */
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductSetCallback} callback Node-style callback called with the error, if any, and ProductSet
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProductSet = function updateProductSet(request, callback) {
                            return this.rpcCall(updateProductSet, $root.google.cloud.vision.v1p4beta1.UpdateProductSetRequest, $root.google.cloud.vision.v1p4beta1.ProductSet, request, callback);
                        }, "name", { value: "UpdateProductSet" });
    
                        /**
                         * Calls UpdateProductSet.
                         * @function updateProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest} request UpdateProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ProductSet>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|deleteProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef DeleteProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProductSet = function deleteProductSet(request, callback) {
                            return this.rpcCall(deleteProductSet, $root.google.cloud.vision.v1p4beta1.DeleteProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProductSet" });
    
                        /**
                         * Calls DeleteProductSet.
                         * @function deleteProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest} request DeleteProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|createProduct}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef CreateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.CreateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createProduct = function createProduct(request, callback) {
                            return this.rpcCall(createProduct, $root.google.cloud.vision.v1p4beta1.CreateProductRequest, $root.google.cloud.vision.v1p4beta1.Product, request, callback);
                        }, "name", { value: "CreateProduct" });
    
                        /**
                         * Calls CreateProduct.
                         * @function createProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest} request CreateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|listProducts}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef ListProductsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ListProductsResponse} [response] ListProductsResponse
                         */
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.ListProductsCallback} callback Node-style callback called with the error, if any, and ListProductsResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProducts = function listProducts(request, callback) {
                            return this.rpcCall(listProducts, $root.google.cloud.vision.v1p4beta1.ListProductsRequest, $root.google.cloud.vision.v1p4beta1.ListProductsResponse, request, callback);
                        }, "name", { value: "ListProducts" });
    
                        /**
                         * Calls ListProducts.
                         * @function listProducts
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest} request ListProductsRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ListProductsResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|getProduct}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef GetProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest} request GetProductRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.GetProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getProduct = function getProduct(request, callback) {
                            return this.rpcCall(getProduct, $root.google.cloud.vision.v1p4beta1.GetProductRequest, $root.google.cloud.vision.v1p4beta1.Product, request, callback);
                        }, "name", { value: "GetProduct" });
    
                        /**
                         * Calls GetProduct.
                         * @function getProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest} request GetProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|updateProduct}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef UpdateProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.Product} [response] Product
                         */
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.UpdateProductCallback} callback Node-style callback called with the error, if any, and Product
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.updateProduct = function updateProduct(request, callback) {
                            return this.rpcCall(updateProduct, $root.google.cloud.vision.v1p4beta1.UpdateProductRequest, $root.google.cloud.vision.v1p4beta1.Product, request, callback);
                        }, "name", { value: "UpdateProduct" });
    
                        /**
                         * Calls UpdateProduct.
                         * @function updateProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest} request UpdateProductRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.Product>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|deleteProduct}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef DeleteProductCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.DeleteProductCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteProduct = function deleteProduct(request, callback) {
                            return this.rpcCall(deleteProduct, $root.google.cloud.vision.v1p4beta1.DeleteProductRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteProduct" });
    
                        /**
                         * Calls DeleteProduct.
                         * @function deleteProduct
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest} request DeleteProductRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|createReferenceImage}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef CreateReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.CreateReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.createReferenceImage = function createReferenceImage(request, callback) {
                            return this.rpcCall(createReferenceImage, $root.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest, $root.google.cloud.vision.v1p4beta1.ReferenceImage, request, callback);
                        }, "name", { value: "CreateReferenceImage" });
    
                        /**
                         * Calls CreateReferenceImage.
                         * @function createReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest} request CreateReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|deleteReferenceImage}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef DeleteReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.DeleteReferenceImageCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.deleteReferenceImage = function deleteReferenceImage(request, callback) {
                            return this.rpcCall(deleteReferenceImage, $root.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "DeleteReferenceImage" });
    
                        /**
                         * Calls DeleteReferenceImage.
                         * @function deleteReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest} request DeleteReferenceImageRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|listReferenceImages}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef ListReferenceImagesCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} [response] ListReferenceImagesResponse
                         */
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.ListReferenceImagesCallback} callback Node-style callback called with the error, if any, and ListReferenceImagesResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listReferenceImages = function listReferenceImages(request, callback) {
                            return this.rpcCall(listReferenceImages, $root.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest, $root.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse, request, callback);
                        }, "name", { value: "ListReferenceImages" });
    
                        /**
                         * Calls ListReferenceImages.
                         * @function listReferenceImages
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest} request ListReferenceImagesRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ListReferenceImagesResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|getReferenceImage}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef GetReferenceImageCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ReferenceImage} [response] ReferenceImage
                         */
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.GetReferenceImageCallback} callback Node-style callback called with the error, if any, and ReferenceImage
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.getReferenceImage = function getReferenceImage(request, callback) {
                            return this.rpcCall(getReferenceImage, $root.google.cloud.vision.v1p4beta1.GetReferenceImageRequest, $root.google.cloud.vision.v1p4beta1.ReferenceImage, request, callback);
                        }, "name", { value: "GetReferenceImage" });
    
                        /**
                         * Calls GetReferenceImage.
                         * @function getReferenceImage
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest} request GetReferenceImageRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ReferenceImage>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|addProductToProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef AddProductToProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.AddProductToProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.addProductToProductSet = function addProductToProductSet(request, callback) {
                            return this.rpcCall(addProductToProductSet, $root.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "AddProductToProductSet" });
    
                        /**
                         * Calls AddProductToProductSet.
                         * @function addProductToProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest} request AddProductToProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|removeProductFromProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef RemoveProductFromProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.protobuf.Empty} [response] Empty
                         */
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.RemoveProductFromProductSetCallback} callback Node-style callback called with the error, if any, and Empty
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.removeProductFromProductSet = function removeProductFromProductSet(request, callback) {
                            return this.rpcCall(removeProductFromProductSet, $root.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest, $root.google.protobuf.Empty, request, callback);
                        }, "name", { value: "RemoveProductFromProductSet" });
    
                        /**
                         * Calls RemoveProductFromProductSet.
                         * @function removeProductFromProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest} request RemoveProductFromProductSetRequest message or plain object
                         * @returns {Promise<google.protobuf.Empty>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|listProductsInProductSet}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef ListProductsInProductSetCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} [response] ListProductsInProductSetResponse
                         */
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.ListProductsInProductSetCallback} callback Node-style callback called with the error, if any, and ListProductsInProductSetResponse
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.listProductsInProductSet = function listProductsInProductSet(request, callback) {
                            return this.rpcCall(listProductsInProductSet, $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest, $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse, request, callback);
                        }, "name", { value: "ListProductsInProductSet" });
    
                        /**
                         * Calls ListProductsInProductSet.
                         * @function listProductsInProductSet
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest} request ListProductsInProductSetRequest message or plain object
                         * @returns {Promise<google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|importProductSets}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef ImportProductSetsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.ImportProductSetsCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.importProductSets = function importProductSets(request, callback) {
                            return this.rpcCall(importProductSets, $root.google.cloud.vision.v1p4beta1.ImportProductSetsRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "ImportProductSets" });
    
                        /**
                         * Calls ImportProductSets.
                         * @function importProductSets
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest} request ImportProductSetsRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        /**
                         * Callback as used by {@link google.cloud.vision.v1p4beta1.ProductSearch|purgeProducts}.
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @typedef PurgeProductsCallback
                         * @type {function}
                         * @param {Error|null} error Error, if any
                         * @param {google.longrunning.Operation} [response] Operation
                         */
    
                        /**
                         * Calls PurgeProducts.
                         * @function purgeProducts
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest} request PurgeProductsRequest message or plain object
                         * @param {google.cloud.vision.v1p4beta1.ProductSearch.PurgeProductsCallback} callback Node-style callback called with the error, if any, and Operation
                         * @returns {undefined}
                         * @variation 1
                         */
                        Object.defineProperty(ProductSearch.prototype.purgeProducts = function purgeProducts(request, callback) {
                            return this.rpcCall(purgeProducts, $root.google.cloud.vision.v1p4beta1.PurgeProductsRequest, $root.google.longrunning.Operation, request, callback);
                        }, "name", { value: "PurgeProducts" });
    
                        /**
                         * Calls PurgeProducts.
                         * @function purgeProducts
                         * @memberof google.cloud.vision.v1p4beta1.ProductSearch
                         * @instance
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest} request PurgeProductsRequest message or plain object
                         * @returns {Promise<google.longrunning.Operation>} Promise
                         * @variation 2
                         */
    
                        return ProductSearch;
                    })();
    
                    v1p4beta1.Product = (function() {
    
                        /**
                         * Properties of a Product.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProduct
                         * @property {string|null} [name] Product name
                         * @property {string|null} [displayName] Product displayName
                         * @property {string|null} [description] Product description
                         * @property {string|null} [productCategory] Product productCategory
                         * @property {Array.<google.cloud.vision.v1p4beta1.Product.IKeyValue>|null} [productLabels] Product productLabels
                         */
    
                        /**
                         * Constructs a new Product.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Product.
                         * @implements IProduct
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProduct=} [properties] Properties to set
                         */
                        function Product(properties) {
                            this.productLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Product name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         */
                        Product.prototype.name = "";
    
                        /**
                         * Product displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         */
                        Product.prototype.displayName = "";
    
                        /**
                         * Product description.
                         * @member {string} description
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         */
                        Product.prototype.description = "";
    
                        /**
                         * Product productCategory.
                         * @member {string} productCategory
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         */
                        Product.prototype.productCategory = "";
    
                        /**
                         * Product productLabels.
                         * @member {Array.<google.cloud.vision.v1p4beta1.Product.IKeyValue>} productLabels
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         */
                        Product.prototype.productLabels = $util.emptyArray;
    
                        /**
                         * Creates a new Product instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProduct=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Product} Product instance
                         */
                        Product.create = function create(properties) {
                            return new Product(properties);
                        };
    
                        /**
                         * Encodes the specified Product message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Product.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                            if (message.productCategory != null && Object.hasOwnProperty.call(message, "productCategory"))
                                writer.uint32(/* id 4, wireType 2 =*/34).string(message.productCategory);
                            if (message.productLabels != null && message.productLabels.length)
                                for (var i = 0; i < message.productLabels.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Product.KeyValue.encode(message.productLabels[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Product message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Product.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProduct} message Product message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Product.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Product();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.description = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.productCategory = reader.string();
                                        break;
                                    }
                                case 5: {
                                        if (!(message.productLabels && message.productLabels.length))
                                            message.productLabels = [];
                                        message.productLabels.push($root.google.cloud.vision.v1p4beta1.Product.KeyValue.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Product message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Product} Product
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Product.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Product message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Product.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.description != null && message.hasOwnProperty("description"))
                                if (!$util.isString(message.description))
                                    return "description: string expected";
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                if (!$util.isString(message.productCategory))
                                    return "productCategory: string expected";
                            if (message.productLabels != null && message.hasOwnProperty("productLabels")) {
                                if (!Array.isArray(message.productLabels))
                                    return "productLabels: array expected";
                                for (var i = 0; i < message.productLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Product.KeyValue.verify(message.productLabels[i]);
                                    if (error)
                                        return "productLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a Product message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Product} Product
                         */
                        Product.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Product)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Product();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.description != null)
                                message.description = String(object.description);
                            if (object.productCategory != null)
                                message.productCategory = String(object.productCategory);
                            if (object.productLabels) {
                                if (!Array.isArray(object.productLabels))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Product.productLabels: array expected");
                                message.productLabels = [];
                                for (var i = 0; i < object.productLabels.length; ++i) {
                                    if (typeof object.productLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.Product.productLabels: object expected");
                                    message.productLabels[i] = $root.google.cloud.vision.v1p4beta1.Product.KeyValue.fromObject(object.productLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Product message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Product} message Product
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Product.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productLabels = [];
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.description = "";
                                object.productCategory = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.description != null && message.hasOwnProperty("description"))
                                object.description = message.description;
                            if (message.productCategory != null && message.hasOwnProperty("productCategory"))
                                object.productCategory = message.productCategory;
                            if (message.productLabels && message.productLabels.length) {
                                object.productLabels = [];
                                for (var j = 0; j < message.productLabels.length; ++j)
                                    object.productLabels[j] = $root.google.cloud.vision.v1p4beta1.Product.KeyValue.toObject(message.productLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this Product to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Product.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Product
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Product
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Product.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Product";
                        };
    
                        Product.KeyValue = (function() {
    
                            /**
                             * Properties of a KeyValue.
                             * @memberof google.cloud.vision.v1p4beta1.Product
                             * @interface IKeyValue
                             * @property {string|null} [key] KeyValue key
                             * @property {string|null} [value] KeyValue value
                             */
    
                            /**
                             * Constructs a new KeyValue.
                             * @memberof google.cloud.vision.v1p4beta1.Product
                             * @classdesc Represents a KeyValue.
                             * @implements IKeyValue
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.Product.IKeyValue=} [properties] Properties to set
                             */
                            function KeyValue(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * KeyValue key.
                             * @member {string} key
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.key = "";
    
                            /**
                             * KeyValue value.
                             * @member {string} value
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @instance
                             */
                            KeyValue.prototype.value = "";
    
                            /**
                             * Creates a new KeyValue instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.Product.IKeyValue=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.Product.KeyValue} KeyValue instance
                             */
                            KeyValue.create = function create(properties) {
                                return new KeyValue(properties);
                            };
    
                            /**
                             * Encodes the specified KeyValue message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Product.KeyValue.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.key != null && Object.hasOwnProperty.call(message, "key"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.key);
                                if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified KeyValue message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Product.KeyValue.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.Product.IKeyValue} message KeyValue message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            KeyValue.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Product.KeyValue();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.key = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.value = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a KeyValue message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.Product.KeyValue} KeyValue
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            KeyValue.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a KeyValue message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            KeyValue.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.key != null && message.hasOwnProperty("key"))
                                    if (!$util.isString(message.key))
                                        return "key: string expected";
                                if (message.value != null && message.hasOwnProperty("value"))
                                    if (!$util.isString(message.value))
                                        return "value: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a KeyValue message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.Product.KeyValue} KeyValue
                             */
                            KeyValue.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.Product.KeyValue)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.Product.KeyValue();
                                if (object.key != null)
                                    message.key = String(object.key);
                                if (object.value != null)
                                    message.value = String(object.value);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a KeyValue message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.Product.KeyValue} message KeyValue
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            KeyValue.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.key = "";
                                    object.value = "";
                                }
                                if (message.key != null && message.hasOwnProperty("key"))
                                    object.key = message.key;
                                if (message.value != null && message.hasOwnProperty("value"))
                                    object.value = message.value;
                                return object;
                            };
    
                            /**
                             * Converts this KeyValue to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            KeyValue.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for KeyValue
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.Product.KeyValue
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            KeyValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Product.KeyValue";
                            };
    
                            return KeyValue;
                        })();
    
                        return Product;
                    })();
    
                    v1p4beta1.ProductSet = (function() {
    
                        /**
                         * Properties of a ProductSet.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProductSet
                         * @property {string|null} [name] ProductSet name
                         * @property {string|null} [displayName] ProductSet displayName
                         * @property {google.protobuf.ITimestamp|null} [indexTime] ProductSet indexTime
                         * @property {google.rpc.IStatus|null} [indexError] ProductSet indexError
                         */
    
                        /**
                         * Constructs a new ProductSet.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ProductSet.
                         * @implements IProductSet
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProductSet=} [properties] Properties to set
                         */
                        function ProductSet(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSet name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.name = "";
    
                        /**
                         * ProductSet displayName.
                         * @member {string} displayName
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.displayName = "";
    
                        /**
                         * ProductSet indexTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} indexTime
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexTime = null;
    
                        /**
                         * ProductSet indexError.
                         * @member {google.rpc.IStatus|null|undefined} indexError
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @instance
                         */
                        ProductSet.prototype.indexError = null;
    
                        /**
                         * Creates a new ProductSet instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSet=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ProductSet} ProductSet instance
                         */
                        ProductSet.create = function create(properties) {
                            return new ProductSet(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSet message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSet.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName);
                            if (message.indexTime != null && Object.hasOwnProperty.call(message, "indexTime"))
                                $root.google.protobuf.Timestamp.encode(message.indexTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.indexError != null && Object.hasOwnProperty.call(message, "indexError"))
                                $root.google.rpc.Status.encode(message.indexError, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSet message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSet.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSet} message ProductSet message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSet.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSet();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.displayName = reader.string();
                                        break;
                                    }
                                case 3: {
                                        message.indexTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 4: {
                                        message.indexError = $root.google.rpc.Status.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSet message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ProductSet} ProductSet
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSet.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSet message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSet.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                if (!$util.isString(message.displayName))
                                    return "displayName: string expected";
                            if (message.indexTime != null && message.hasOwnProperty("indexTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.indexTime);
                                if (error)
                                    return "indexTime." + error;
                            }
                            if (message.indexError != null && message.hasOwnProperty("indexError")) {
                                var error = $root.google.rpc.Status.verify(message.indexError);
                                if (error)
                                    return "indexError." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ProductSet message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ProductSet} ProductSet
                         */
                        ProductSet.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSet)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ProductSet();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.displayName != null)
                                message.displayName = String(object.displayName);
                            if (object.indexTime != null) {
                                if (typeof object.indexTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSet.indexTime: object expected");
                                message.indexTime = $root.google.protobuf.Timestamp.fromObject(object.indexTime);
                            }
                            if (object.indexError != null) {
                                if (typeof object.indexError !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ProductSet.indexError: object expected");
                                message.indexError = $root.google.rpc.Status.fromObject(object.indexError);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSet message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ProductSet} message ProductSet
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSet.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.displayName = "";
                                object.indexTime = null;
                                object.indexError = null;
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.displayName != null && message.hasOwnProperty("displayName"))
                                object.displayName = message.displayName;
                            if (message.indexTime != null && message.hasOwnProperty("indexTime"))
                                object.indexTime = $root.google.protobuf.Timestamp.toObject(message.indexTime, options);
                            if (message.indexError != null && message.hasOwnProperty("indexError"))
                                object.indexError = $root.google.rpc.Status.toObject(message.indexError, options);
                            return object;
                        };
    
                        /**
                         * Converts this ProductSet to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSet.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSet
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ProductSet
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSet";
                        };
    
                        return ProductSet;
                    })();
    
                    v1p4beta1.ReferenceImage = (function() {
    
                        /**
                         * Properties of a ReferenceImage.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IReferenceImage
                         * @property {string|null} [name] ReferenceImage name
                         * @property {string|null} [uri] ReferenceImage uri
                         * @property {Array.<google.cloud.vision.v1p4beta1.IBoundingPoly>|null} [boundingPolys] ReferenceImage boundingPolys
                         */
    
                        /**
                         * Constructs a new ReferenceImage.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ReferenceImage.
                         * @implements IReferenceImage
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IReferenceImage=} [properties] Properties to set
                         */
                        function ReferenceImage(properties) {
                            this.boundingPolys = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ReferenceImage name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.name = "";
    
                        /**
                         * ReferenceImage uri.
                         * @member {string} uri
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.uri = "";
    
                        /**
                         * ReferenceImage boundingPolys.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IBoundingPoly>} boundingPolys
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @instance
                         */
                        ReferenceImage.prototype.boundingPolys = $util.emptyArray;
    
                        /**
                         * Creates a new ReferenceImage instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IReferenceImage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ReferenceImage} ReferenceImage instance
                         */
                        ReferenceImage.create = function create(properties) {
                            return new ReferenceImage(properties);
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ReferenceImage.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.uri != null && Object.hasOwnProperty.call(message, "uri"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.uri);
                            if (message.boundingPolys != null && message.boundingPolys.length)
                                for (var i = 0; i < message.boundingPolys.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingPolys[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ReferenceImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ReferenceImage.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IReferenceImage} message ReferenceImage message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ReferenceImage.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ReferenceImage();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.uri = reader.string();
                                        break;
                                    }
                                case 3: {
                                        if (!(message.boundingPolys && message.boundingPolys.length))
                                            message.boundingPolys = [];
                                        message.boundingPolys.push($root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ReferenceImage message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ReferenceImage} ReferenceImage
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ReferenceImage.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ReferenceImage message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ReferenceImage.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                if (!$util.isString(message.uri))
                                    return "uri: string expected";
                            if (message.boundingPolys != null && message.hasOwnProperty("boundingPolys")) {
                                if (!Array.isArray(message.boundingPolys))
                                    return "boundingPolys: array expected";
                                for (var i = 0; i < message.boundingPolys.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingPolys[i]);
                                    if (error)
                                        return "boundingPolys." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a ReferenceImage message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ReferenceImage} ReferenceImage
                         */
                        ReferenceImage.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ReferenceImage)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ReferenceImage();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.uri != null)
                                message.uri = String(object.uri);
                            if (object.boundingPolys) {
                                if (!Array.isArray(object.boundingPolys))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ReferenceImage.boundingPolys: array expected");
                                message.boundingPolys = [];
                                for (var i = 0; i < object.boundingPolys.length; ++i) {
                                    if (typeof object.boundingPolys[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ReferenceImage.boundingPolys: object expected");
                                    message.boundingPolys[i] = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingPolys[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ReferenceImage message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ReferenceImage} message ReferenceImage
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ReferenceImage.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.boundingPolys = [];
                            if (options.defaults) {
                                object.name = "";
                                object.uri = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.uri != null && message.hasOwnProperty("uri"))
                                object.uri = message.uri;
                            if (message.boundingPolys && message.boundingPolys.length) {
                                object.boundingPolys = [];
                                for (var j = 0; j < message.boundingPolys.length; ++j)
                                    object.boundingPolys[j] = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingPolys[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ReferenceImage to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ReferenceImage.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ReferenceImage
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ReferenceImage
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ReferenceImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ReferenceImage";
                        };
    
                        return ReferenceImage;
                    })();
    
                    v1p4beta1.CreateProductRequest = (function() {
    
                        /**
                         * Properties of a CreateProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICreateProductRequest
                         * @property {string|null} [parent] CreateProductRequest parent
                         * @property {google.cloud.vision.v1p4beta1.IProduct|null} [product] CreateProductRequest product
                         * @property {string|null} [productId] CreateProductRequest productId
                         */
    
                        /**
                         * Constructs a new CreateProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CreateProductRequest.
                         * @implements ICreateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest=} [properties] Properties to set
                         */
                        function CreateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.parent = "";
    
                        /**
                         * CreateProductRequest product.
                         * @member {google.cloud.vision.v1p4beta1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.product = null;
    
                        /**
                         * CreateProductRequest productId.
                         * @member {string} productId
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @instance
                         */
                        CreateProductRequest.prototype.productId = "";
    
                        /**
                         * Creates a new CreateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductRequest} CreateProductRequest instance
                         */
                        CreateProductRequest.create = function create(properties) {
                            return new CreateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1p4beta1.Product.encode(message.product, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productId != null && Object.hasOwnProperty.call(message, "productId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductRequest} message CreateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CreateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = $root.google.cloud.vision.v1p4beta1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductRequest} CreateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1p4beta1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                if (!$util.isString(message.productId))
                                    return "productId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductRequest} CreateProductRequest
                         */
                        CreateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CreateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CreateProductRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CreateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1p4beta1.Product.fromObject(object.product);
                            }
                            if (object.productId != null)
                                message.productId = String(object.productId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CreateProductRequest} message CreateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.product = null;
                                object.productId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1p4beta1.Product.toObject(message.product, options);
                            if (message.productId != null && message.hasOwnProperty("productId"))
                                object.productId = message.productId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CreateProductRequest";
                        };
    
                        return CreateProductRequest;
                    })();
    
                    v1p4beta1.ListProductsRequest = (function() {
    
                        /**
                         * Properties of a ListProductsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductsRequest
                         * @property {string|null} [parent] ListProductsRequest parent
                         * @property {number|null} [pageSize] ListProductsRequest pageSize
                         * @property {string|null} [pageToken] ListProductsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductsRequest.
                         * @implements IListProductsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest=} [properties] Properties to set
                         */
                        function ListProductsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.parent = "";
    
                        /**
                         * ListProductsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @instance
                         */
                        ListProductsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsRequest} ListProductsRequest instance
                         */
                        ListProductsRequest.create = function create(properties) {
                            return new ListProductsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsRequest} message ListProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsRequest} ListProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsRequest} ListProductsRequest
                         */
                        ListProductsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductsRequest} message ListProductsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductsRequest";
                        };
    
                        return ListProductsRequest;
                    })();
    
                    v1p4beta1.ListProductsResponse = (function() {
    
                        /**
                         * Properties of a ListProductsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductsResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IProduct>|null} [products] ListProductsResponse products
                         * @property {string|null} [nextPageToken] ListProductsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductsResponse.
                         * @implements IListProductsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductsResponse=} [properties] Properties to set
                         */
                        function ListProductsResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsResponse products.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IProduct>} products
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @instance
                         */
                        ListProductsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsResponse} ListProductsResponse instance
                         */
                        ListProductsResponse.create = function create(properties) {
                            return new ListProductsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsResponse} message ListProductsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1p4beta1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsResponse} ListProductsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsResponse} ListProductsResponse
                         */
                        ListProductsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductsResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ListProductsResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ListProductsResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1p4beta1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductsResponse} message ListProductsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1p4beta1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductsResponse";
                        };
    
                        return ListProductsResponse;
                    })();
    
                    v1p4beta1.GetProductRequest = (function() {
    
                        /**
                         * Properties of a GetProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IGetProductRequest
                         * @property {string|null} [name] GetProductRequest name
                         */
    
                        /**
                         * Constructs a new GetProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a GetProductRequest.
                         * @implements IGetProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest=} [properties] Properties to set
                         */
                        function GetProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @instance
                         */
                        GetProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.GetProductRequest} GetProductRequest instance
                         */
                        GetProductRequest.create = function create(properties) {
                            return new GetProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductRequest} message GetProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.GetProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.GetProductRequest} GetProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.GetProductRequest} GetProductRequest
                         */
                        GetProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.GetProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.GetProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.GetProductRequest} message GetProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.GetProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.GetProductRequest";
                        };
    
                        return GetProductRequest;
                    })();
    
                    v1p4beta1.UpdateProductRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IUpdateProductRequest
                         * @property {google.cloud.vision.v1p4beta1.IProduct|null} [product] UpdateProductRequest product
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an UpdateProductRequest.
                         * @implements IUpdateProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest=} [properties] Properties to set
                         */
                        function UpdateProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductRequest product.
                         * @member {google.cloud.vision.v1p4beta1.IProduct|null|undefined} product
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.product = null;
    
                        /**
                         * UpdateProductRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @instance
                         */
                        UpdateProductRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductRequest} UpdateProductRequest instance
                         */
                        UpdateProductRequest.create = function create(properties) {
                            return new UpdateProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.UpdateProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                $root.google.cloud.vision.v1p4beta1.Product.encode(message.product, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.UpdateProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductRequest} message UpdateProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.UpdateProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.product = $root.google.cloud.vision.v1p4beta1.Product.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductRequest} UpdateProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.product != null && message.hasOwnProperty("product")) {
                                var error = $root.google.cloud.vision.v1p4beta1.Product.verify(message.product);
                                if (error)
                                    return "product." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductRequest} UpdateProductRequest
                         */
                        UpdateProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.UpdateProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.UpdateProductRequest();
                            if (object.product != null) {
                                if (typeof object.product !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.UpdateProductRequest.product: object expected");
                                message.product = $root.google.cloud.vision.v1p4beta1.Product.fromObject(object.product);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.UpdateProductRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.UpdateProductRequest} message UpdateProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.product = null;
                                object.updateMask = null;
                            }
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = $root.google.cloud.vision.v1p4beta1.Product.toObject(message.product, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.UpdateProductRequest";
                        };
    
                        return UpdateProductRequest;
                    })();
    
                    v1p4beta1.DeleteProductRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IDeleteProductRequest
                         * @property {string|null} [name] DeleteProductRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a DeleteProductRequest.
                         * @implements IDeleteProductRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest=} [properties] Properties to set
                         */
                        function DeleteProductRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @instance
                         */
                        DeleteProductRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductRequest} DeleteProductRequest instance
                         */
                        DeleteProductRequest.create = function create(properties) {
                            return new DeleteProductRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteProductRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteProductRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductRequest} message DeleteProductRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.DeleteProductRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductRequest} DeleteProductRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductRequest} DeleteProductRequest
                         */
                        DeleteProductRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.DeleteProductRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.DeleteProductRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.DeleteProductRequest} message DeleteProductRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.DeleteProductRequest";
                        };
    
                        return DeleteProductRequest;
                    })();
    
                    v1p4beta1.CreateProductSetRequest = (function() {
    
                        /**
                         * Properties of a CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICreateProductSetRequest
                         * @property {string|null} [parent] CreateProductSetRequest parent
                         * @property {google.cloud.vision.v1p4beta1.IProductSet|null} [productSet] CreateProductSetRequest productSet
                         * @property {string|null} [productSetId] CreateProductSetRequest productSetId
                         */
    
                        /**
                         * Constructs a new CreateProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CreateProductSetRequest.
                         * @implements ICreateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest=} [properties] Properties to set
                         */
                        function CreateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateProductSetRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.parent = "";
    
                        /**
                         * CreateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1p4beta1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * CreateProductSetRequest productSetId.
                         * @member {string} productSetId
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @instance
                         */
                        CreateProductSetRequest.prototype.productSetId = "";
    
                        /**
                         * Creates a new CreateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductSetRequest} CreateProductSetRequest instance
                         */
                        CreateProductSetRequest.create = function create(properties) {
                            return new CreateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1p4beta1.ProductSet.encode(message.productSet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.productSetId != null && Object.hasOwnProperty.call(message, "productSetId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.productSetId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateProductSetRequest} message CreateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CreateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.productSetId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductSetRequest} CreateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                if (!$util.isString(message.productSetId))
                                    return "productSetId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CreateProductSetRequest} CreateProductSetRequest
                         */
                        CreateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CreateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CreateProductSetRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CreateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.productSetId != null)
                                message.productSetId = String(object.productSetId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CreateProductSetRequest} message CreateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.productSet = null;
                                object.productSetId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.toObject(message.productSet, options);
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                object.productSetId = message.productSetId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CreateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CreateProductSetRequest";
                        };
    
                        return CreateProductSetRequest;
                    })();
    
                    v1p4beta1.ListProductSetsRequest = (function() {
    
                        /**
                         * Properties of a ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductSetsRequest
                         * @property {string|null} [parent] ListProductSetsRequest parent
                         * @property {number|null} [pageSize] ListProductSetsRequest pageSize
                         * @property {string|null} [pageToken] ListProductSetsRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductSetsRequest.
                         * @implements IListProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest=} [properties] Properties to set
                         */
                        function ListProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ListProductSetsRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductSetsRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @instance
                         */
                        ListProductSetsRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsRequest} ListProductSetsRequest instance
                         */
                        ListProductSetsRequest.create = function create(properties) {
                            return new ListProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsRequest} message ListProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsRequest} ListProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsRequest} ListProductSetsRequest
                         */
                        ListProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductSetsRequest} message ListProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductSetsRequest";
                        };
    
                        return ListProductSetsRequest;
                    })();
    
                    v1p4beta1.ListProductSetsResponse = (function() {
    
                        /**
                         * Properties of a ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IProductSet>|null} [productSets] ListProductSetsResponse productSets
                         * @property {string|null} [nextPageToken] ListProductSetsResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductSetsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductSetsResponse.
                         * @implements IListProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsResponse=} [properties] Properties to set
                         */
                        function ListProductSetsResponse(properties) {
                            this.productSets = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductSetsResponse productSets.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IProductSet>} productSets
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.productSets = $util.emptyArray;
    
                        /**
                         * ListProductSetsResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @instance
                         */
                        ListProductSetsResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsResponse} ListProductSetsResponse instance
                         */
                        ListProductSetsResponse.create = function create(properties) {
                            return new ListProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSets != null && message.productSets.length)
                                for (var i = 0; i < message.productSets.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ProductSet.encode(message.productSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductSetsResponse} message ListProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.productSets && message.productSets.length))
                                            message.productSets = [];
                                        message.productSets.push($root.google.cloud.vision.v1p4beta1.ProductSet.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsResponse} ListProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSets != null && message.hasOwnProperty("productSets")) {
                                if (!Array.isArray(message.productSets))
                                    return "productSets: array expected";
                                for (var i = 0; i < message.productSets.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ProductSet.verify(message.productSets[i]);
                                    if (error)
                                        return "productSets." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductSetsResponse} ListProductSetsResponse
                         */
                        ListProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductSetsResponse();
                            if (object.productSets) {
                                if (!Array.isArray(object.productSets))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ListProductSetsResponse.productSets: array expected");
                                message.productSets = [];
                                for (var i = 0; i < object.productSets.length; ++i) {
                                    if (typeof object.productSets[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ListProductSetsResponse.productSets: object expected");
                                    message.productSets[i] = $root.google.cloud.vision.v1p4beta1.ProductSet.fromObject(object.productSets[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductSetsResponse} message ListProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.productSets = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.productSets && message.productSets.length) {
                                object.productSets = [];
                                for (var j = 0; j < message.productSets.length; ++j)
                                    object.productSets[j] = $root.google.cloud.vision.v1p4beta1.ProductSet.toObject(message.productSets[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductSetsResponse";
                        };
    
                        return ListProductSetsResponse;
                    })();
    
                    v1p4beta1.GetProductSetRequest = (function() {
    
                        /**
                         * Properties of a GetProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IGetProductSetRequest
                         * @property {string|null} [name] GetProductSetRequest name
                         */
    
                        /**
                         * Constructs a new GetProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a GetProductSetRequest.
                         * @implements IGetProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest=} [properties] Properties to set
                         */
                        function GetProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @instance
                         */
                        GetProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.GetProductSetRequest} GetProductSetRequest instance
                         */
                        GetProductSetRequest.create = function create(properties) {
                            return new GetProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetProductSetRequest} message GetProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.GetProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.GetProductSetRequest} GetProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.GetProductSetRequest} GetProductSetRequest
                         */
                        GetProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.GetProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.GetProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.GetProductSetRequest} message GetProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.GetProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.GetProductSetRequest";
                        };
    
                        return GetProductSetRequest;
                    })();
    
                    v1p4beta1.UpdateProductSetRequest = (function() {
    
                        /**
                         * Properties of an UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IUpdateProductSetRequest
                         * @property {google.cloud.vision.v1p4beta1.IProductSet|null} [productSet] UpdateProductSetRequest productSet
                         * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateProductSetRequest updateMask
                         */
    
                        /**
                         * Constructs a new UpdateProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an UpdateProductSetRequest.
                         * @implements IUpdateProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest=} [properties] Properties to set
                         */
                        function UpdateProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * UpdateProductSetRequest productSet.
                         * @member {google.cloud.vision.v1p4beta1.IProductSet|null|undefined} productSet
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.productSet = null;
    
                        /**
                         * UpdateProductSetRequest updateMask.
                         * @member {google.protobuf.IFieldMask|null|undefined} updateMask
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @instance
                         */
                        UpdateProductSetRequest.prototype.updateMask = null;
    
                        /**
                         * Creates a new UpdateProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductSetRequest} UpdateProductSetRequest instance
                         */
                        UpdateProductSetRequest.create = function create(properties) {
                            return new UpdateProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSet != null && Object.hasOwnProperty.call(message, "productSet"))
                                $root.google.cloud.vision.v1p4beta1.ProductSet.encode(message.productSet, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask"))
                                $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified UpdateProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.UpdateProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IUpdateProductSetRequest} message UpdateProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        UpdateProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.UpdateProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an UpdateProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        UpdateProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an UpdateProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        UpdateProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSet != null && message.hasOwnProperty("productSet")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ProductSet.verify(message.productSet);
                                if (error)
                                    return "productSet." + error;
                            }
                            if (message.updateMask != null && message.hasOwnProperty("updateMask")) {
                                var error = $root.google.protobuf.FieldMask.verify(message.updateMask);
                                if (error)
                                    return "updateMask." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an UpdateProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.UpdateProductSetRequest} UpdateProductSetRequest
                         */
                        UpdateProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.UpdateProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.UpdateProductSetRequest();
                            if (object.productSet != null) {
                                if (typeof object.productSet !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.UpdateProductSetRequest.productSet: object expected");
                                message.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.fromObject(object.productSet);
                            }
                            if (object.updateMask != null) {
                                if (typeof object.updateMask !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.UpdateProductSetRequest.updateMask: object expected");
                                message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an UpdateProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.UpdateProductSetRequest} message UpdateProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        UpdateProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.productSet = null;
                                object.updateMask = null;
                            }
                            if (message.productSet != null && message.hasOwnProperty("productSet"))
                                object.productSet = $root.google.cloud.vision.v1p4beta1.ProductSet.toObject(message.productSet, options);
                            if (message.updateMask != null && message.hasOwnProperty("updateMask"))
                                object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options);
                            return object;
                        };
    
                        /**
                         * Converts this UpdateProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        UpdateProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for UpdateProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.UpdateProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        UpdateProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.UpdateProductSetRequest";
                        };
    
                        return UpdateProductSetRequest;
                    })();
    
                    v1p4beta1.DeleteProductSetRequest = (function() {
    
                        /**
                         * Properties of a DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IDeleteProductSetRequest
                         * @property {string|null} [name] DeleteProductSetRequest name
                         */
    
                        /**
                         * Constructs a new DeleteProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a DeleteProductSetRequest.
                         * @implements IDeleteProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest=} [properties] Properties to set
                         */
                        function DeleteProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @instance
                         */
                        DeleteProductSetRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductSetRequest} DeleteProductSetRequest instance
                         */
                        DeleteProductSetRequest.create = function create(properties) {
                            return new DeleteProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteProductSetRequest} message DeleteProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.DeleteProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.DeleteProductSetRequest} DeleteProductSetRequest
                         */
                        DeleteProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.DeleteProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.DeleteProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.DeleteProductSetRequest} message DeleteProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.DeleteProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.DeleteProductSetRequest";
                        };
    
                        return DeleteProductSetRequest;
                    })();
    
                    v1p4beta1.CreateReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ICreateReferenceImageRequest
                         * @property {string|null} [parent] CreateReferenceImageRequest parent
                         * @property {google.cloud.vision.v1p4beta1.IReferenceImage|null} [referenceImage] CreateReferenceImageRequest referenceImage
                         * @property {string|null} [referenceImageId] CreateReferenceImageRequest referenceImageId
                         */
    
                        /**
                         * Constructs a new CreateReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a CreateReferenceImageRequest.
                         * @implements ICreateReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest=} [properties] Properties to set
                         */
                        function CreateReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * CreateReferenceImageRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.parent = "";
    
                        /**
                         * CreateReferenceImageRequest referenceImage.
                         * @member {google.cloud.vision.v1p4beta1.IReferenceImage|null|undefined} referenceImage
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImage = null;
    
                        /**
                         * CreateReferenceImageRequest referenceImageId.
                         * @member {string} referenceImageId
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @instance
                         */
                        CreateReferenceImageRequest.prototype.referenceImageId = "";
    
                        /**
                         * Creates a new CreateReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} CreateReferenceImageRequest instance
                         */
                        CreateReferenceImageRequest.create = function create(properties) {
                            return new CreateReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.referenceImage != null && Object.hasOwnProperty.call(message, "referenceImage"))
                                $root.google.cloud.vision.v1p4beta1.ReferenceImage.encode(message.referenceImage, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.referenceImageId != null && Object.hasOwnProperty.call(message, "referenceImageId"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.referenceImageId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified CreateReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ICreateReferenceImageRequest} message CreateReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        CreateReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.referenceImage = $root.google.cloud.vision.v1p4beta1.ReferenceImage.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.referenceImageId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a CreateReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        CreateReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a CreateReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        CreateReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ReferenceImage.verify(message.referenceImage);
                                if (error)
                                    return "referenceImage." + error;
                            }
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                if (!$util.isString(message.referenceImageId))
                                    return "referenceImageId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a CreateReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} CreateReferenceImageRequest
                         */
                        CreateReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.referenceImage != null) {
                                if (typeof object.referenceImage !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.CreateReferenceImageRequest.referenceImage: object expected");
                                message.referenceImage = $root.google.cloud.vision.v1p4beta1.ReferenceImage.fromObject(object.referenceImage);
                            }
                            if (object.referenceImageId != null)
                                message.referenceImageId = String(object.referenceImageId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a CreateReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.CreateReferenceImageRequest} message CreateReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        CreateReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.referenceImage = null;
                                object.referenceImageId = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.referenceImage != null && message.hasOwnProperty("referenceImage"))
                                object.referenceImage = $root.google.cloud.vision.v1p4beta1.ReferenceImage.toObject(message.referenceImage, options);
                            if (message.referenceImageId != null && message.hasOwnProperty("referenceImageId"))
                                object.referenceImageId = message.referenceImageId;
                            return object;
                        };
    
                        /**
                         * Converts this CreateReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        CreateReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for CreateReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.CreateReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        CreateReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.CreateReferenceImageRequest";
                        };
    
                        return CreateReferenceImageRequest;
                    })();
    
                    v1p4beta1.ListReferenceImagesRequest = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListReferenceImagesRequest
                         * @property {string|null} [parent] ListReferenceImagesRequest parent
                         * @property {number|null} [pageSize] ListReferenceImagesRequest pageSize
                         * @property {string|null} [pageToken] ListReferenceImagesRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListReferenceImagesRequest.
                         * @implements IListReferenceImagesRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest=} [properties] Properties to set
                         */
                        function ListReferenceImagesRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.parent = "";
    
                        /**
                         * ListReferenceImagesRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @instance
                         */
                        ListReferenceImagesRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} ListReferenceImagesRequest instance
                         */
                        ListReferenceImagesRequest.create = function create(properties) {
                            return new ListReferenceImagesRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListReferenceImagesRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesRequest} message ListReferenceImagesRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} ListReferenceImagesRequest
                         */
                        ListReferenceImagesRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListReferenceImagesRequest} message ListReferenceImagesRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListReferenceImagesRequest";
                        };
    
                        return ListReferenceImagesRequest;
                    })();
    
                    v1p4beta1.ListReferenceImagesResponse = (function() {
    
                        /**
                         * Properties of a ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListReferenceImagesResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IReferenceImage>|null} [referenceImages] ListReferenceImagesResponse referenceImages
                         * @property {number|null} [pageSize] ListReferenceImagesResponse pageSize
                         * @property {string|null} [nextPageToken] ListReferenceImagesResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListReferenceImagesResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListReferenceImagesResponse.
                         * @implements IListReferenceImagesResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesResponse=} [properties] Properties to set
                         */
                        function ListReferenceImagesResponse(properties) {
                            this.referenceImages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListReferenceImagesResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ListReferenceImagesResponse pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.pageSize = 0;
    
                        /**
                         * ListReferenceImagesResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @instance
                         */
                        ListReferenceImagesResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListReferenceImagesResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} ListReferenceImagesResponse instance
                         */
                        ListReferenceImagesResponse.create = function create(properties) {
                            return new ListReferenceImagesResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListReferenceImagesResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListReferenceImagesResponse} message ListReferenceImagesResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListReferenceImagesResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1p4beta1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListReferenceImagesResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListReferenceImagesResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListReferenceImagesResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListReferenceImagesResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListReferenceImagesResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} ListReferenceImagesResponse
                         */
                        ListReferenceImagesResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ListReferenceImagesResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1p4beta1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListReferenceImagesResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListReferenceImagesResponse} message ListReferenceImagesResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListReferenceImagesResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.referenceImages = [];
                            if (options.defaults) {
                                object.pageSize = 0;
                                object.nextPageToken = "";
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1p4beta1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListReferenceImagesResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListReferenceImagesResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListReferenceImagesResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListReferenceImagesResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListReferenceImagesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListReferenceImagesResponse";
                        };
    
                        return ListReferenceImagesResponse;
                    })();
    
                    v1p4beta1.GetReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IGetReferenceImageRequest
                         * @property {string|null} [name] GetReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new GetReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a GetReferenceImageRequest.
                         * @implements IGetReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest=} [properties] Properties to set
                         */
                        function GetReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * GetReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @instance
                         */
                        GetReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new GetReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.GetReferenceImageRequest} GetReferenceImageRequest instance
                         */
                        GetReferenceImageRequest.create = function create(properties) {
                            return new GetReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified GetReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.GetReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IGetReferenceImageRequest} message GetReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        GetReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.GetReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a GetReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        GetReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a GetReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        GetReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a GetReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.GetReferenceImageRequest} GetReferenceImageRequest
                         */
                        GetReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.GetReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.GetReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a GetReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.GetReferenceImageRequest} message GetReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        GetReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this GetReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        GetReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for GetReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.GetReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        GetReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.GetReferenceImageRequest";
                        };
    
                        return GetReferenceImageRequest;
                    })();
    
                    v1p4beta1.DeleteReferenceImageRequest = (function() {
    
                        /**
                         * Properties of a DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IDeleteReferenceImageRequest
                         * @property {string|null} [name] DeleteReferenceImageRequest name
                         */
    
                        /**
                         * Constructs a new DeleteReferenceImageRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a DeleteReferenceImageRequest.
                         * @implements IDeleteReferenceImageRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         */
                        function DeleteReferenceImageRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * DeleteReferenceImageRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @instance
                         */
                        DeleteReferenceImageRequest.prototype.name = "";
    
                        /**
                         * Creates a new DeleteReferenceImageRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest instance
                         */
                        DeleteReferenceImageRequest.create = function create(properties) {
                            return new DeleteReferenceImageRequest(properties);
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified DeleteReferenceImageRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IDeleteReferenceImageRequest} message DeleteReferenceImageRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        DeleteReferenceImageRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a DeleteReferenceImageRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        DeleteReferenceImageRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a DeleteReferenceImageRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        DeleteReferenceImageRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a DeleteReferenceImageRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} DeleteReferenceImageRequest
                         */
                        DeleteReferenceImageRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a DeleteReferenceImageRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest} message DeleteReferenceImageRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        DeleteReferenceImageRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.name = "";
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            return object;
                        };
    
                        /**
                         * Converts this DeleteReferenceImageRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        DeleteReferenceImageRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for DeleteReferenceImageRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        DeleteReferenceImageRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest";
                        };
    
                        return DeleteReferenceImageRequest;
                    })();
    
                    v1p4beta1.AddProductToProductSetRequest = (function() {
    
                        /**
                         * Properties of an AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IAddProductToProductSetRequest
                         * @property {string|null} [name] AddProductToProductSetRequest name
                         * @property {string|null} [product] AddProductToProductSetRequest product
                         */
    
                        /**
                         * Constructs a new AddProductToProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an AddProductToProductSetRequest.
                         * @implements IAddProductToProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest=} [properties] Properties to set
                         */
                        function AddProductToProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * AddProductToProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.name = "";
    
                        /**
                         * AddProductToProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @instance
                         */
                        AddProductToProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new AddProductToProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} AddProductToProductSetRequest instance
                         */
                        AddProductToProductSetRequest.create = function create(properties) {
                            return new AddProductToProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified AddProductToProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.AddProductToProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IAddProductToProductSetRequest} message AddProductToProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        AddProductToProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an AddProductToProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        AddProductToProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an AddProductToProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        AddProductToProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an AddProductToProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} AddProductToProductSetRequest
                         */
                        AddProductToProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an AddProductToProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.AddProductToProductSetRequest} message AddProductToProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        AddProductToProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this AddProductToProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        AddProductToProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for AddProductToProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.AddProductToProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        AddProductToProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.AddProductToProductSetRequest";
                        };
    
                        return AddProductToProductSetRequest;
                    })();
    
                    v1p4beta1.RemoveProductFromProductSetRequest = (function() {
    
                        /**
                         * Properties of a RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IRemoveProductFromProductSetRequest
                         * @property {string|null} [name] RemoveProductFromProductSetRequest name
                         * @property {string|null} [product] RemoveProductFromProductSetRequest product
                         */
    
                        /**
                         * Constructs a new RemoveProductFromProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a RemoveProductFromProductSetRequest.
                         * @implements IRemoveProductFromProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         */
                        function RemoveProductFromProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * RemoveProductFromProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.name = "";
    
                        /**
                         * RemoveProductFromProductSetRequest product.
                         * @member {string} product
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @instance
                         */
                        RemoveProductFromProductSetRequest.prototype.product = "";
    
                        /**
                         * Creates a new RemoveProductFromProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest instance
                         */
                        RemoveProductFromProductSetRequest.create = function create(properties) {
                            return new RemoveProductFromProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.product != null && Object.hasOwnProperty.call(message, "product"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.product);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified RemoveProductFromProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IRemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        RemoveProductFromProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.product = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a RemoveProductFromProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        RemoveProductFromProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a RemoveProductFromProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        RemoveProductFromProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.product != null && message.hasOwnProperty("product"))
                                if (!$util.isString(message.product))
                                    return "product: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a RemoveProductFromProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} RemoveProductFromProductSetRequest
                         */
                        RemoveProductFromProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.product != null)
                                message.product = String(object.product);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a RemoveProductFromProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest} message RemoveProductFromProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        RemoveProductFromProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.product = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.product != null && message.hasOwnProperty("product"))
                                object.product = message.product;
                            return object;
                        };
    
                        /**
                         * Converts this RemoveProductFromProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        RemoveProductFromProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for RemoveProductFromProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        RemoveProductFromProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest";
                        };
    
                        return RemoveProductFromProductSetRequest;
                    })();
    
                    v1p4beta1.ListProductsInProductSetRequest = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductsInProductSetRequest
                         * @property {string|null} [name] ListProductsInProductSetRequest name
                         * @property {number|null} [pageSize] ListProductsInProductSetRequest pageSize
                         * @property {string|null} [pageToken] ListProductsInProductSetRequest pageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductsInProductSetRequest.
                         * @implements IListProductsInProductSetRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest=} [properties] Properties to set
                         */
                        function ListProductsInProductSetRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetRequest name.
                         * @member {string} name
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.name = "";
    
                        /**
                         * ListProductsInProductSetRequest pageSize.
                         * @member {number} pageSize
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageSize = 0;
    
                        /**
                         * ListProductsInProductSetRequest pageToken.
                         * @member {string} pageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @instance
                         */
                        ListProductsInProductSetRequest.prototype.pageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest instance
                         */
                        ListProductsInProductSetRequest.create = function create(properties) {
                            return new ListProductsInProductSetRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                            if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                            if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetRequest} message ListProductsInProductSetRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.name = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.pageSize = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.pageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.name != null && message.hasOwnProperty("name"))
                                if (!$util.isString(message.name))
                                    return "name: string expected";
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                if (!$util.isInteger(message.pageSize))
                                    return "pageSize: integer expected";
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                if (!$util.isString(message.pageToken))
                                    return "pageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} ListProductsInProductSetRequest
                         */
                        ListProductsInProductSetRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest();
                            if (object.name != null)
                                message.name = String(object.name);
                            if (object.pageSize != null)
                                message.pageSize = object.pageSize | 0;
                            if (object.pageToken != null)
                                message.pageToken = String(object.pageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest} message ListProductsInProductSetRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.name = "";
                                object.pageSize = 0;
                                object.pageToken = "";
                            }
                            if (message.name != null && message.hasOwnProperty("name"))
                                object.name = message.name;
                            if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                                object.pageSize = message.pageSize;
                            if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                                object.pageToken = message.pageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest";
                        };
    
                        return ListProductsInProductSetRequest;
                    })();
    
                    v1p4beta1.ListProductsInProductSetResponse = (function() {
    
                        /**
                         * Properties of a ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IListProductsInProductSetResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IProduct>|null} [products] ListProductsInProductSetResponse products
                         * @property {string|null} [nextPageToken] ListProductsInProductSetResponse nextPageToken
                         */
    
                        /**
                         * Constructs a new ListProductsInProductSetResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ListProductsInProductSetResponse.
                         * @implements IListProductsInProductSetResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetResponse=} [properties] Properties to set
                         */
                        function ListProductsInProductSetResponse(properties) {
                            this.products = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ListProductsInProductSetResponse products.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IProduct>} products
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.products = $util.emptyArray;
    
                        /**
                         * ListProductsInProductSetResponse nextPageToken.
                         * @member {string} nextPageToken
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @instance
                         */
                        ListProductsInProductSetResponse.prototype.nextPageToken = "";
    
                        /**
                         * Creates a new ListProductsInProductSetResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse instance
                         */
                        ListProductsInProductSetResponse.create = function create(properties) {
                            return new ListProductsInProductSetResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.products != null && message.products.length)
                                for (var i = 0; i < message.products.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Product.encode(message.products[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ListProductsInProductSetResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IListProductsInProductSetResponse} message ListProductsInProductSetResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ListProductsInProductSetResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.products && message.products.length))
                                            message.products = [];
                                        message.products.push($root.google.cloud.vision.v1p4beta1.Product.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.nextPageToken = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ListProductsInProductSetResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ListProductsInProductSetResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ListProductsInProductSetResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ListProductsInProductSetResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.products != null && message.hasOwnProperty("products")) {
                                if (!Array.isArray(message.products))
                                    return "products: array expected";
                                for (var i = 0; i < message.products.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Product.verify(message.products[i]);
                                    if (error)
                                        return "products." + error;
                                }
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                if (!$util.isString(message.nextPageToken))
                                    return "nextPageToken: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ListProductsInProductSetResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} ListProductsInProductSetResponse
                         */
                        ListProductsInProductSetResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse();
                            if (object.products) {
                                if (!Array.isArray(object.products))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.products: array expected");
                                message.products = [];
                                for (var i = 0; i < object.products.length; ++i) {
                                    if (typeof object.products[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse.products: object expected");
                                    message.products[i] = $root.google.cloud.vision.v1p4beta1.Product.fromObject(object.products[i]);
                                }
                            }
                            if (object.nextPageToken != null)
                                message.nextPageToken = String(object.nextPageToken);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ListProductsInProductSetResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse} message ListProductsInProductSetResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ListProductsInProductSetResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.products = [];
                            if (options.defaults)
                                object.nextPageToken = "";
                            if (message.products && message.products.length) {
                                object.products = [];
                                for (var j = 0; j < message.products.length; ++j)
                                    object.products[j] = $root.google.cloud.vision.v1p4beta1.Product.toObject(message.products[j], options);
                            }
                            if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                                object.nextPageToken = message.nextPageToken;
                            return object;
                        };
    
                        /**
                         * Converts this ListProductsInProductSetResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ListProductsInProductSetResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ListProductsInProductSetResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ListProductsInProductSetResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse";
                        };
    
                        return ListProductsInProductSetResponse;
                    })();
    
                    v1p4beta1.ImportProductSetsGcsSource = (function() {
    
                        /**
                         * Properties of an ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImportProductSetsGcsSource
                         * @property {string|null} [csvFileUri] ImportProductSetsGcsSource csvFileUri
                         */
    
                        /**
                         * Constructs a new ImportProductSetsGcsSource.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImportProductSetsGcsSource.
                         * @implements IImportProductSetsGcsSource
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource=} [properties] Properties to set
                         */
                        function ImportProductSetsGcsSource(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsGcsSource csvFileUri.
                         * @member {string} csvFileUri
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @instance
                         */
                        ImportProductSetsGcsSource.prototype.csvFileUri = "";
    
                        /**
                         * Creates a new ImportProductSetsGcsSource instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource instance
                         */
                        ImportProductSetsGcsSource.create = function create(properties) {
                            return new ImportProductSetsGcsSource(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.csvFileUri != null && Object.hasOwnProperty.call(message, "csvFileUri"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.csvFileUri);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsGcsSource message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource} message ImportProductSetsGcsSource message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsGcsSource.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.csvFileUri = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsGcsSource message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsGcsSource.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsGcsSource message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsGcsSource.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                if (!$util.isString(message.csvFileUri))
                                    return "csvFileUri: string expected";
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsGcsSource message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} ImportProductSetsGcsSource
                         */
                        ImportProductSetsGcsSource.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource();
                            if (object.csvFileUri != null)
                                message.csvFileUri = String(object.csvFileUri);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsGcsSource message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource} message ImportProductSetsGcsSource
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsGcsSource.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.csvFileUri = "";
                            if (message.csvFileUri != null && message.hasOwnProperty("csvFileUri"))
                                object.csvFileUri = message.csvFileUri;
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsGcsSource to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsGcsSource.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsGcsSource
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsGcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource";
                        };
    
                        return ImportProductSetsGcsSource;
                    })();
    
                    v1p4beta1.ImportProductSetsInputConfig = (function() {
    
                        /**
                         * Properties of an ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImportProductSetsInputConfig
                         * @property {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource|null} [gcsSource] ImportProductSetsInputConfig gcsSource
                         */
    
                        /**
                         * Constructs a new ImportProductSetsInputConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImportProductSetsInputConfig.
                         * @implements IImportProductSetsInputConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig=} [properties] Properties to set
                         */
                        function ImportProductSetsInputConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsInputConfig gcsSource.
                         * @member {google.cloud.vision.v1p4beta1.IImportProductSetsGcsSource|null|undefined} gcsSource
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @instance
                         */
                        ImportProductSetsInputConfig.prototype.gcsSource = null;
    
                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;
    
                        /**
                         * ImportProductSetsInputConfig source.
                         * @member {"gcsSource"|undefined} source
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @instance
                         */
                        Object.defineProperty(ImportProductSetsInputConfig.prototype, "source", {
                            get: $util.oneOfGetter($oneOfFields = ["gcsSource"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });
    
                        /**
                         * Creates a new ImportProductSetsInputConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig instance
                         */
                        ImportProductSetsInputConfig.create = function create(properties) {
                            return new ImportProductSetsInputConfig(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource"))
                                $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.encode(message.gcsSource, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsInputConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig} message ImportProductSetsInputConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsInputConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.gcsSource = $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsInputConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsInputConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsInputConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsInputConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                properties.source = 1;
                                {
                                    var error = $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.verify(message.gcsSource);
                                    if (error)
                                        return "gcsSource." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsInputConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} ImportProductSetsInputConfig
                         */
                        ImportProductSetsInputConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig();
                            if (object.gcsSource != null) {
                                if (typeof object.gcsSource !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.gcsSource: object expected");
                                message.gcsSource = $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.fromObject(object.gcsSource);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsInputConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig} message ImportProductSetsInputConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsInputConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) {
                                object.gcsSource = $root.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource.toObject(message.gcsSource, options);
                                if (options.oneofs)
                                    object.source = "gcsSource";
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsInputConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsInputConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsInputConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsInputConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig";
                        };
    
                        return ImportProductSetsInputConfig;
                    })();
    
                    v1p4beta1.ImportProductSetsRequest = (function() {
    
                        /**
                         * Properties of an ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImportProductSetsRequest
                         * @property {string|null} [parent] ImportProductSetsRequest parent
                         * @property {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig|null} [inputConfig] ImportProductSetsRequest inputConfig
                         */
    
                        /**
                         * Constructs a new ImportProductSetsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImportProductSetsRequest.
                         * @implements IImportProductSetsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest=} [properties] Properties to set
                         */
                        function ImportProductSetsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.parent = "";
    
                        /**
                         * ImportProductSetsRequest inputConfig.
                         * @member {google.cloud.vision.v1p4beta1.IImportProductSetsInputConfig|null|undefined} inputConfig
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @instance
                         */
                        ImportProductSetsRequest.prototype.inputConfig = null;
    
                        /**
                         * Creates a new ImportProductSetsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsRequest} ImportProductSetsRequest instance
                         */
                        ImportProductSetsRequest.create = function create(properties) {
                            return new ImportProductSetsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.inputConfig != null && Object.hasOwnProperty.call(message, "inputConfig"))
                                $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.encode(message.inputConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsRequest} message ImportProductSetsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 2: {
                                        message.inputConfig = $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig")) {
                                var error = $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.verify(message.inputConfig);
                                if (error)
                                    return "inputConfig." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsRequest} ImportProductSetsRequest
                         */
                        ImportProductSetsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImportProductSetsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsRequest();
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.inputConfig != null) {
                                if (typeof object.inputConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsRequest.inputConfig: object expected");
                                message.inputConfig = $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.fromObject(object.inputConfig);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImportProductSetsRequest} message ImportProductSetsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.inputConfig = null;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.inputConfig != null && message.hasOwnProperty("inputConfig"))
                                object.inputConfig = $root.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.toObject(message.inputConfig, options);
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImportProductSetsRequest";
                        };
    
                        return ImportProductSetsRequest;
                    })();
    
                    v1p4beta1.ImportProductSetsResponse = (function() {
    
                        /**
                         * Properties of an ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IImportProductSetsResponse
                         * @property {Array.<google.cloud.vision.v1p4beta1.IReferenceImage>|null} [referenceImages] ImportProductSetsResponse referenceImages
                         * @property {Array.<google.rpc.IStatus>|null} [statuses] ImportProductSetsResponse statuses
                         */
    
                        /**
                         * Constructs a new ImportProductSetsResponse.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents an ImportProductSetsResponse.
                         * @implements IImportProductSetsResponse
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsResponse=} [properties] Properties to set
                         */
                        function ImportProductSetsResponse(properties) {
                            this.referenceImages = [];
                            this.statuses = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ImportProductSetsResponse referenceImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IReferenceImage>} referenceImages
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.referenceImages = $util.emptyArray;
    
                        /**
                         * ImportProductSetsResponse statuses.
                         * @member {Array.<google.rpc.IStatus>} statuses
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @instance
                         */
                        ImportProductSetsResponse.prototype.statuses = $util.emptyArray;
    
                        /**
                         * Creates a new ImportProductSetsResponse instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsResponse=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsResponse} ImportProductSetsResponse instance
                         */
                        ImportProductSetsResponse.create = function create(properties) {
                            return new ImportProductSetsResponse(properties);
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.referenceImages != null && message.referenceImages.length)
                                for (var i = 0; i < message.referenceImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.ReferenceImage.encode(message.referenceImages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.statuses != null && message.statuses.length)
                                for (var i = 0; i < message.statuses.length; ++i)
                                    $root.google.rpc.Status.encode(message.statuses[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ImportProductSetsResponse message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ImportProductSetsResponse.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IImportProductSetsResponse} message ImportProductSetsResponse message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ImportProductSetsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsResponse();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.referenceImages && message.referenceImages.length))
                                            message.referenceImages = [];
                                        message.referenceImages.push($root.google.cloud.vision.v1p4beta1.ReferenceImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.statuses && message.statuses.length))
                                            message.statuses = [];
                                        message.statuses.push($root.google.rpc.Status.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes an ImportProductSetsResponse message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ImportProductSetsResponse.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies an ImportProductSetsResponse message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ImportProductSetsResponse.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.referenceImages != null && message.hasOwnProperty("referenceImages")) {
                                if (!Array.isArray(message.referenceImages))
                                    return "referenceImages: array expected";
                                for (var i = 0; i < message.referenceImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.ReferenceImage.verify(message.referenceImages[i]);
                                    if (error)
                                        return "referenceImages." + error;
                                }
                            }
                            if (message.statuses != null && message.hasOwnProperty("statuses")) {
                                if (!Array.isArray(message.statuses))
                                    return "statuses: array expected";
                                for (var i = 0; i < message.statuses.length; ++i) {
                                    var error = $root.google.rpc.Status.verify(message.statuses[i]);
                                    if (error)
                                        return "statuses." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates an ImportProductSetsResponse message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ImportProductSetsResponse} ImportProductSetsResponse
                         */
                        ImportProductSetsResponse.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ImportProductSetsResponse)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ImportProductSetsResponse();
                            if (object.referenceImages) {
                                if (!Array.isArray(object.referenceImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsResponse.referenceImages: array expected");
                                message.referenceImages = [];
                                for (var i = 0; i < object.referenceImages.length; ++i) {
                                    if (typeof object.referenceImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsResponse.referenceImages: object expected");
                                    message.referenceImages[i] = $root.google.cloud.vision.v1p4beta1.ReferenceImage.fromObject(object.referenceImages[i]);
                                }
                            }
                            if (object.statuses) {
                                if (!Array.isArray(object.statuses))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsResponse.statuses: array expected");
                                message.statuses = [];
                                for (var i = 0; i < object.statuses.length; ++i) {
                                    if (typeof object.statuses[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.ImportProductSetsResponse.statuses: object expected");
                                    message.statuses[i] = $root.google.rpc.Status.fromObject(object.statuses[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from an ImportProductSetsResponse message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ImportProductSetsResponse} message ImportProductSetsResponse
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ImportProductSetsResponse.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.referenceImages = [];
                                object.statuses = [];
                            }
                            if (message.referenceImages && message.referenceImages.length) {
                                object.referenceImages = [];
                                for (var j = 0; j < message.referenceImages.length; ++j)
                                    object.referenceImages[j] = $root.google.cloud.vision.v1p4beta1.ReferenceImage.toObject(message.referenceImages[j], options);
                            }
                            if (message.statuses && message.statuses.length) {
                                object.statuses = [];
                                for (var j = 0; j < message.statuses.length; ++j)
                                    object.statuses[j] = $root.google.rpc.Status.toObject(message.statuses[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this ImportProductSetsResponse to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ImportProductSetsResponse.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ImportProductSetsResponse
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ImportProductSetsResponse
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ImportProductSetsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ImportProductSetsResponse";
                        };
    
                        return ImportProductSetsResponse;
                    })();
    
                    v1p4beta1.BatchOperationMetadata = (function() {
    
                        /**
                         * Properties of a BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBatchOperationMetadata
                         * @property {google.cloud.vision.v1p4beta1.BatchOperationMetadata.State|null} [state] BatchOperationMetadata state
                         * @property {google.protobuf.ITimestamp|null} [submitTime] BatchOperationMetadata submitTime
                         * @property {google.protobuf.ITimestamp|null} [endTime] BatchOperationMetadata endTime
                         */
    
                        /**
                         * Constructs a new BatchOperationMetadata.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a BatchOperationMetadata.
                         * @implements IBatchOperationMetadata
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBatchOperationMetadata=} [properties] Properties to set
                         */
                        function BatchOperationMetadata(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * BatchOperationMetadata state.
                         * @member {google.cloud.vision.v1p4beta1.BatchOperationMetadata.State} state
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.state = 0;
    
                        /**
                         * BatchOperationMetadata submitTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} submitTime
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.submitTime = null;
    
                        /**
                         * BatchOperationMetadata endTime.
                         * @member {google.protobuf.ITimestamp|null|undefined} endTime
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @instance
                         */
                        BatchOperationMetadata.prototype.endTime = null;
    
                        /**
                         * Creates a new BatchOperationMetadata instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchOperationMetadata=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.BatchOperationMetadata} BatchOperationMetadata instance
                         */
                        BatchOperationMetadata.create = function create(properties) {
                            return new BatchOperationMetadata(properties);
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchOperationMetadata.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.state != null && Object.hasOwnProperty.call(message, "state"))
                                writer.uint32(/* id 1, wireType 0 =*/8).int32(message.state);
                            if (message.submitTime != null && Object.hasOwnProperty.call(message, "submitTime"))
                                $root.google.protobuf.Timestamp.encode(message.submitTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime"))
                                $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified BatchOperationMetadata message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.BatchOperationMetadata.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBatchOperationMetadata} message BatchOperationMetadata message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        BatchOperationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.state = reader.int32();
                                        break;
                                    }
                                case 2: {
                                        message.submitTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32());
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a BatchOperationMetadata message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.BatchOperationMetadata} BatchOperationMetadata
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        BatchOperationMetadata.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a BatchOperationMetadata message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        BatchOperationMetadata.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.state != null && message.hasOwnProperty("state"))
                                switch (message.state) {
                                default:
                                    return "state: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                    break;
                                }
                            if (message.submitTime != null && message.hasOwnProperty("submitTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.submitTime);
                                if (error)
                                    return "submitTime." + error;
                            }
                            if (message.endTime != null && message.hasOwnProperty("endTime")) {
                                var error = $root.google.protobuf.Timestamp.verify(message.endTime);
                                if (error)
                                    return "endTime." + error;
                            }
                            return null;
                        };
    
                        /**
                         * Creates a BatchOperationMetadata message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.BatchOperationMetadata} BatchOperationMetadata
                         */
                        BatchOperationMetadata.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata();
                            switch (object.state) {
                            default:
                                if (typeof object.state === "number") {
                                    message.state = object.state;
                                    break;
                                }
                                break;
                            case "STATE_UNSPECIFIED":
                            case 0:
                                message.state = 0;
                                break;
                            case "PROCESSING":
                            case 1:
                                message.state = 1;
                                break;
                            case "SUCCESSFUL":
                            case 2:
                                message.state = 2;
                                break;
                            case "FAILED":
                            case 3:
                                message.state = 3;
                                break;
                            case "CANCELLED":
                            case 4:
                                message.state = 4;
                                break;
                            }
                            if (object.submitTime != null) {
                                if (typeof object.submitTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchOperationMetadata.submitTime: object expected");
                                message.submitTime = $root.google.protobuf.Timestamp.fromObject(object.submitTime);
                            }
                            if (object.endTime != null) {
                                if (typeof object.endTime !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.BatchOperationMetadata.endTime: object expected");
                                message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime);
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a BatchOperationMetadata message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.BatchOperationMetadata} message BatchOperationMetadata
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        BatchOperationMetadata.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0;
                                object.submitTime = null;
                                object.endTime = null;
                            }
                            if (message.state != null && message.hasOwnProperty("state"))
                                object.state = options.enums === String ? $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State[message.state] === undefined ? message.state : $root.google.cloud.vision.v1p4beta1.BatchOperationMetadata.State[message.state] : message.state;
                            if (message.submitTime != null && message.hasOwnProperty("submitTime"))
                                object.submitTime = $root.google.protobuf.Timestamp.toObject(message.submitTime, options);
                            if (message.endTime != null && message.hasOwnProperty("endTime"))
                                object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options);
                            return object;
                        };
    
                        /**
                         * Converts this BatchOperationMetadata to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        BatchOperationMetadata.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for BatchOperationMetadata
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.BatchOperationMetadata
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        BatchOperationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.BatchOperationMetadata";
                        };
    
                        /**
                         * State enum.
                         * @name google.cloud.vision.v1p4beta1.BatchOperationMetadata.State
                         * @enum {number}
                         * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value
                         * @property {number} PROCESSING=1 PROCESSING value
                         * @property {number} SUCCESSFUL=2 SUCCESSFUL value
                         * @property {number} FAILED=3 FAILED value
                         * @property {number} CANCELLED=4 CANCELLED value
                         */
                        BatchOperationMetadata.State = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "STATE_UNSPECIFIED"] = 0;
                            values[valuesById[1] = "PROCESSING"] = 1;
                            values[valuesById[2] = "SUCCESSFUL"] = 2;
                            values[valuesById[3] = "FAILED"] = 3;
                            values[valuesById[4] = "CANCELLED"] = 4;
                            return values;
                        })();
    
                        return BatchOperationMetadata;
                    })();
    
                    v1p4beta1.ProductSetPurgeConfig = (function() {
    
                        /**
                         * Properties of a ProductSetPurgeConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IProductSetPurgeConfig
                         * @property {string|null} [productSetId] ProductSetPurgeConfig productSetId
                         */
    
                        /**
                         * Constructs a new ProductSetPurgeConfig.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a ProductSetPurgeConfig.
                         * @implements IProductSetPurgeConfig
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig=} [properties] Properties to set
                         */
                        function ProductSetPurgeConfig(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * ProductSetPurgeConfig productSetId.
                         * @member {string} productSetId
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @instance
                         */
                        ProductSetPurgeConfig.prototype.productSetId = "";
    
                        /**
                         * Creates a new ProductSetPurgeConfig instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} ProductSetPurgeConfig instance
                         */
                        ProductSetPurgeConfig.create = function create(properties) {
                            return new ProductSetPurgeConfig(properties);
                        };
    
                        /**
                         * Encodes the specified ProductSetPurgeConfig message. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig} message ProductSetPurgeConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSetPurgeConfig.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.productSetId != null && Object.hasOwnProperty.call(message, "productSetId"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.productSetId);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified ProductSetPurgeConfig message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig} message ProductSetPurgeConfig message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        ProductSetPurgeConfig.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a ProductSetPurgeConfig message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSetPurgeConfig.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.productSetId = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a ProductSetPurgeConfig message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        ProductSetPurgeConfig.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a ProductSetPurgeConfig message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        ProductSetPurgeConfig.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                if (!$util.isString(message.productSetId))
                                    return "productSetId: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a ProductSetPurgeConfig message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} ProductSetPurgeConfig
                         */
                        ProductSetPurgeConfig.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig();
                            if (object.productSetId != null)
                                message.productSetId = String(object.productSetId);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a ProductSetPurgeConfig message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ProductSetPurgeConfig} message ProductSetPurgeConfig
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        ProductSetPurgeConfig.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults)
                                object.productSetId = "";
                            if (message.productSetId != null && message.hasOwnProperty("productSetId"))
                                object.productSetId = message.productSetId;
                            return object;
                        };
    
                        /**
                         * Converts this ProductSetPurgeConfig to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        ProductSetPurgeConfig.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for ProductSetPurgeConfig
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.ProductSetPurgeConfig
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        ProductSetPurgeConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.ProductSetPurgeConfig";
                        };
    
                        return ProductSetPurgeConfig;
                    })();
    
                    v1p4beta1.PurgeProductsRequest = (function() {
    
                        /**
                         * Properties of a PurgeProductsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IPurgeProductsRequest
                         * @property {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig|null} [productSetPurgeConfig] PurgeProductsRequest productSetPurgeConfig
                         * @property {boolean|null} [deleteOrphanProducts] PurgeProductsRequest deleteOrphanProducts
                         * @property {string|null} [parent] PurgeProductsRequest parent
                         * @property {boolean|null} [force] PurgeProductsRequest force
                         */
    
                        /**
                         * Constructs a new PurgeProductsRequest.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a PurgeProductsRequest.
                         * @implements IPurgeProductsRequest
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest=} [properties] Properties to set
                         */
                        function PurgeProductsRequest(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * PurgeProductsRequest productSetPurgeConfig.
                         * @member {google.cloud.vision.v1p4beta1.IProductSetPurgeConfig|null|undefined} productSetPurgeConfig
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.productSetPurgeConfig = null;
    
                        /**
                         * PurgeProductsRequest deleteOrphanProducts.
                         * @member {boolean|null|undefined} deleteOrphanProducts
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.deleteOrphanProducts = null;
    
                        /**
                         * PurgeProductsRequest parent.
                         * @member {string} parent
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.parent = "";
    
                        /**
                         * PurgeProductsRequest force.
                         * @member {boolean} force
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         */
                        PurgeProductsRequest.prototype.force = false;
    
                        // OneOf field names bound to virtual getters and setters
                        var $oneOfFields;
    
                        /**
                         * PurgeProductsRequest target.
                         * @member {"productSetPurgeConfig"|"deleteOrphanProducts"|undefined} target
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         */
                        Object.defineProperty(PurgeProductsRequest.prototype, "target", {
                            get: $util.oneOfGetter($oneOfFields = ["productSetPurgeConfig", "deleteOrphanProducts"]),
                            set: $util.oneOfSetter($oneOfFields)
                        });
    
                        /**
                         * Creates a new PurgeProductsRequest instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.PurgeProductsRequest} PurgeProductsRequest instance
                         */
                        PurgeProductsRequest.create = function create(properties) {
                            return new PurgeProductsRequest(properties);
                        };
    
                        /**
                         * Encodes the specified PurgeProductsRequest message. Does not implicitly {@link google.cloud.vision.v1p4beta1.PurgeProductsRequest.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest} message PurgeProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PurgeProductsRequest.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.parent != null && Object.hasOwnProperty.call(message, "parent"))
                                writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent);
                            if (message.productSetPurgeConfig != null && Object.hasOwnProperty.call(message, "productSetPurgeConfig"))
                                $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.encode(message.productSetPurgeConfig, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.deleteOrphanProducts != null && Object.hasOwnProperty.call(message, "deleteOrphanProducts"))
                                writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deleteOrphanProducts);
                            if (message.force != null && Object.hasOwnProperty.call(message, "force"))
                                writer.uint32(/* id 4, wireType 0 =*/32).bool(message.force);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified PurgeProductsRequest message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.PurgeProductsRequest.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPurgeProductsRequest} message PurgeProductsRequest message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        PurgeProductsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a PurgeProductsRequest message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.PurgeProductsRequest} PurgeProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PurgeProductsRequest.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.PurgeProductsRequest();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 2: {
                                        message.productSetPurgeConfig = $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.deleteOrphanProducts = reader.bool();
                                        break;
                                    }
                                case 1: {
                                        message.parent = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.force = reader.bool();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a PurgeProductsRequest message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.PurgeProductsRequest} PurgeProductsRequest
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        PurgeProductsRequest.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a PurgeProductsRequest message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        PurgeProductsRequest.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            var properties = {};
                            if (message.productSetPurgeConfig != null && message.hasOwnProperty("productSetPurgeConfig")) {
                                properties.target = 1;
                                {
                                    var error = $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.verify(message.productSetPurgeConfig);
                                    if (error)
                                        return "productSetPurgeConfig." + error;
                                }
                            }
                            if (message.deleteOrphanProducts != null && message.hasOwnProperty("deleteOrphanProducts")) {
                                if (properties.target === 1)
                                    return "target: multiple values";
                                properties.target = 1;
                                if (typeof message.deleteOrphanProducts !== "boolean")
                                    return "deleteOrphanProducts: boolean expected";
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                if (!$util.isString(message.parent))
                                    return "parent: string expected";
                            if (message.force != null && message.hasOwnProperty("force"))
                                if (typeof message.force !== "boolean")
                                    return "force: boolean expected";
                            return null;
                        };
    
                        /**
                         * Creates a PurgeProductsRequest message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.PurgeProductsRequest} PurgeProductsRequest
                         */
                        PurgeProductsRequest.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.PurgeProductsRequest)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.PurgeProductsRequest();
                            if (object.productSetPurgeConfig != null) {
                                if (typeof object.productSetPurgeConfig !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.PurgeProductsRequest.productSetPurgeConfig: object expected");
                                message.productSetPurgeConfig = $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.fromObject(object.productSetPurgeConfig);
                            }
                            if (object.deleteOrphanProducts != null)
                                message.deleteOrphanProducts = Boolean(object.deleteOrphanProducts);
                            if (object.parent != null)
                                message.parent = String(object.parent);
                            if (object.force != null)
                                message.force = Boolean(object.force);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a PurgeProductsRequest message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.PurgeProductsRequest} message PurgeProductsRequest
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        PurgeProductsRequest.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.parent = "";
                                object.force = false;
                            }
                            if (message.parent != null && message.hasOwnProperty("parent"))
                                object.parent = message.parent;
                            if (message.productSetPurgeConfig != null && message.hasOwnProperty("productSetPurgeConfig")) {
                                object.productSetPurgeConfig = $root.google.cloud.vision.v1p4beta1.ProductSetPurgeConfig.toObject(message.productSetPurgeConfig, options);
                                if (options.oneofs)
                                    object.target = "productSetPurgeConfig";
                            }
                            if (message.deleteOrphanProducts != null && message.hasOwnProperty("deleteOrphanProducts")) {
                                object.deleteOrphanProducts = message.deleteOrphanProducts;
                                if (options.oneofs)
                                    object.target = "deleteOrphanProducts";
                            }
                            if (message.force != null && message.hasOwnProperty("force"))
                                object.force = message.force;
                            return object;
                        };
    
                        /**
                         * Converts this PurgeProductsRequest to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        PurgeProductsRequest.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for PurgeProductsRequest
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.PurgeProductsRequest
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        PurgeProductsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.PurgeProductsRequest";
                        };
    
                        return PurgeProductsRequest;
                    })();
    
                    v1p4beta1.TextAnnotation = (function() {
    
                        /**
                         * Properties of a TextAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ITextAnnotation
                         * @property {Array.<google.cloud.vision.v1p4beta1.IPage>|null} [pages] TextAnnotation pages
                         * @property {string|null} [text] TextAnnotation text
                         */
    
                        /**
                         * Constructs a new TextAnnotation.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a TextAnnotation.
                         * @implements ITextAnnotation
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ITextAnnotation=} [properties] Properties to set
                         */
                        function TextAnnotation(properties) {
                            this.pages = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * TextAnnotation pages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IPage>} pages
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.pages = $util.emptyArray;
    
                        /**
                         * TextAnnotation text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @instance
                         */
                        TextAnnotation.prototype.text = "";
    
                        /**
                         * Creates a new TextAnnotation instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextAnnotation=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.TextAnnotation} TextAnnotation instance
                         */
                        TextAnnotation.create = function create(properties) {
                            return new TextAnnotation(properties);
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.pages != null && message.pages.length)
                                for (var i = 0; i < message.pages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Page.encode(message.pages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 2, wireType 2 =*/18).string(message.text);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified TextAnnotation message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ITextAnnotation} message TextAnnotation message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        TextAnnotation.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.pages && message.pages.length))
                                            message.pages = [];
                                        message.pages.push($root.google.cloud.vision.v1p4beta1.Page.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        message.text = reader.string();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a TextAnnotation message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.TextAnnotation} TextAnnotation
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        TextAnnotation.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a TextAnnotation message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        TextAnnotation.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.pages != null && message.hasOwnProperty("pages")) {
                                if (!Array.isArray(message.pages))
                                    return "pages: array expected";
                                for (var i = 0; i < message.pages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Page.verify(message.pages[i]);
                                    if (error)
                                        return "pages." + error;
                                }
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            return null;
                        };
    
                        /**
                         * Creates a TextAnnotation message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.TextAnnotation} TextAnnotation
                         */
                        TextAnnotation.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.TextAnnotation)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation();
                            if (object.pages) {
                                if (!Array.isArray(object.pages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.TextAnnotation.pages: array expected");
                                message.pages = [];
                                for (var i = 0; i < object.pages.length; ++i) {
                                    if (typeof object.pages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.TextAnnotation.pages: object expected");
                                    message.pages[i] = $root.google.cloud.vision.v1p4beta1.Page.fromObject(object.pages[i]);
                                }
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a TextAnnotation message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.TextAnnotation} message TextAnnotation
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        TextAnnotation.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.pages = [];
                            if (options.defaults)
                                object.text = "";
                            if (message.pages && message.pages.length) {
                                object.pages = [];
                                for (var j = 0; j < message.pages.length; ++j)
                                    object.pages[j] = $root.google.cloud.vision.v1p4beta1.Page.toObject(message.pages[j], options);
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            return object;
                        };
    
                        /**
                         * Converts this TextAnnotation to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        TextAnnotation.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for TextAnnotation
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        TextAnnotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.TextAnnotation";
                        };
    
                        TextAnnotation.DetectedLanguage = (function() {
    
                            /**
                             * Properties of a DetectedLanguage.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @interface IDetectedLanguage
                             * @property {string|null} [languageCode] DetectedLanguage languageCode
                             * @property {number|null} [confidence] DetectedLanguage confidence
                             */
    
                            /**
                             * Constructs a new DetectedLanguage.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @classdesc Represents a DetectedLanguage.
                             * @implements IDetectedLanguage
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             */
                            function DetectedLanguage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedLanguage languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.languageCode = "";
    
                            /**
                             * DetectedLanguage confidence.
                             * @member {number} confidence
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             */
                            DetectedLanguage.prototype.confidence = 0;
    
                            /**
                             * Creates a new DetectedLanguage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} DetectedLanguage instance
                             */
                            DetectedLanguage.create = function create(properties) {
                                return new DetectedLanguage(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.languageCode);
                                if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.confidence);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedLanguage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage} message DetectedLanguage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedLanguage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.confidence = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedLanguage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedLanguage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedLanguage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedLanguage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    if (typeof message.confidence !== "number")
                                        return "confidence: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedLanguage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} DetectedLanguage
                             */
                            DetectedLanguage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage();
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                if (object.confidence != null)
                                    message.confidence = Number(object.confidence);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedLanguage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage} message DetectedLanguage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedLanguage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.languageCode = "";
                                    object.confidence = 0;
                                }
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                if (message.confidence != null && message.hasOwnProperty("confidence"))
                                    object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedLanguage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedLanguage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedLanguage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedLanguage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage";
                            };
    
                            return DetectedLanguage;
                        })();
    
                        TextAnnotation.DetectedBreak = (function() {
    
                            /**
                             * Properties of a DetectedBreak.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @interface IDetectedBreak
                             * @property {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType|null} [type] DetectedBreak type
                             * @property {boolean|null} [isPrefix] DetectedBreak isPrefix
                             */
    
                            /**
                             * Constructs a new DetectedBreak.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @classdesc Represents a DetectedBreak.
                             * @implements IDetectedBreak
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             */
                            function DetectedBreak(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * DetectedBreak type.
                             * @member {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType} type
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.type = 0;
    
                            /**
                             * DetectedBreak isPrefix.
                             * @member {boolean} isPrefix
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @instance
                             */
                            DetectedBreak.prototype.isPrefix = false;
    
                            /**
                             * Creates a new DetectedBreak instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} DetectedBreak instance
                             */
                            DetectedBreak.create = function create(properties) {
                                return new DetectedBreak(properties);
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                                    writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type);
                                if (message.isPrefix != null && Object.hasOwnProperty.call(message, "isPrefix"))
                                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isPrefix);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified DetectedBreak message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak} message DetectedBreak message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            DetectedBreak.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.type = reader.int32();
                                            break;
                                        }
                                    case 2: {
                                            message.isPrefix = reader.bool();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a DetectedBreak message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            DetectedBreak.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a DetectedBreak message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            DetectedBreak.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.type != null && message.hasOwnProperty("type"))
                                    switch (message.type) {
                                    default:
                                        return "type: enum value expected";
                                    case 0:
                                    case 1:
                                    case 2:
                                    case 3:
                                    case 4:
                                    case 5:
                                        break;
                                    }
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    if (typeof message.isPrefix !== "boolean")
                                        return "isPrefix: boolean expected";
                                return null;
                            };
    
                            /**
                             * Creates a DetectedBreak message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} DetectedBreak
                             */
                            DetectedBreak.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak();
                                switch (object.type) {
                                default:
                                    if (typeof object.type === "number") {
                                        message.type = object.type;
                                        break;
                                    }
                                    break;
                                case "UNKNOWN":
                                case 0:
                                    message.type = 0;
                                    break;
                                case "SPACE":
                                case 1:
                                    message.type = 1;
                                    break;
                                case "SURE_SPACE":
                                case 2:
                                    message.type = 2;
                                    break;
                                case "EOL_SURE_SPACE":
                                case 3:
                                    message.type = 3;
                                    break;
                                case "HYPHEN":
                                case 4:
                                    message.type = 4;
                                    break;
                                case "LINE_BREAK":
                                case 5:
                                    message.type = 5;
                                    break;
                                }
                                if (object.isPrefix != null)
                                    message.isPrefix = Boolean(object.isPrefix);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a DetectedBreak message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak} message DetectedBreak
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            DetectedBreak.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.type = options.enums === String ? "UNKNOWN" : 0;
                                    object.isPrefix = false;
                                }
                                if (message.type != null && message.hasOwnProperty("type"))
                                    object.type = options.enums === String ? $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType[message.type] === undefined ? message.type : $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType[message.type] : message.type;
                                if (message.isPrefix != null && message.hasOwnProperty("isPrefix"))
                                    object.isPrefix = message.isPrefix;
                                return object;
                            };
    
                            /**
                             * Converts this DetectedBreak to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            DetectedBreak.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for DetectedBreak
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            DetectedBreak.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak";
                            };
    
                            /**
                             * BreakType enum.
                             * @name google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.BreakType
                             * @enum {number}
                             * @property {number} UNKNOWN=0 UNKNOWN value
                             * @property {number} SPACE=1 SPACE value
                             * @property {number} SURE_SPACE=2 SURE_SPACE value
                             * @property {number} EOL_SURE_SPACE=3 EOL_SURE_SPACE value
                             * @property {number} HYPHEN=4 HYPHEN value
                             * @property {number} LINE_BREAK=5 LINE_BREAK value
                             */
                            DetectedBreak.BreakType = (function() {
                                var valuesById = {}, values = Object.create(valuesById);
                                values[valuesById[0] = "UNKNOWN"] = 0;
                                values[valuesById[1] = "SPACE"] = 1;
                                values[valuesById[2] = "SURE_SPACE"] = 2;
                                values[valuesById[3] = "EOL_SURE_SPACE"] = 3;
                                values[valuesById[4] = "HYPHEN"] = 4;
                                values[valuesById[5] = "LINE_BREAK"] = 5;
                                return values;
                            })();
    
                            return DetectedBreak;
                        })();
    
                        TextAnnotation.TextProperty = (function() {
    
                            /**
                             * Properties of a TextProperty.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @interface ITextProperty
                             * @property {Array.<google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage>|null} [detectedLanguages] TextProperty detectedLanguages
                             * @property {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak|null} [detectedBreak] TextProperty detectedBreak
                             */
    
                            /**
                             * Constructs a new TextProperty.
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation
                             * @classdesc Represents a TextProperty.
                             * @implements ITextProperty
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             */
                            function TextProperty(properties) {
                                this.detectedLanguages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * TextProperty detectedLanguages.
                             * @member {Array.<google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedLanguage>} detectedLanguages
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedLanguages = $util.emptyArray;
    
                            /**
                             * TextProperty detectedBreak.
                             * @member {google.cloud.vision.v1p4beta1.TextAnnotation.IDetectedBreak|null|undefined} detectedBreak
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @instance
                             */
                            TextProperty.prototype.detectedBreak = null;
    
                            /**
                             * Creates a new TextProperty instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} TextProperty instance
                             */
                            TextProperty.create = function create(properties) {
                                return new TextProperty(properties);
                            };
    
                            /**
                             * Encodes the specified TextProperty message. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.detectedLanguages != null && message.detectedLanguages.length)
                                    for (var i = 0; i < message.detectedLanguages.length; ++i)
                                        $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.encode(message.detectedLanguages[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                                if (message.detectedBreak != null && Object.hasOwnProperty.call(message, "detectedBreak"))
                                    $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.encode(message.detectedBreak, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified TextProperty message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty} message TextProperty message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            TextProperty.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            if (!(message.detectedLanguages && message.detectedLanguages.length))
                                                message.detectedLanguages = [];
                                            message.detectedLanguages.push($root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 2: {
                                            message.detectedBreak = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.decode(reader, reader.uint32());
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a TextProperty message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} TextProperty
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            TextProperty.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a TextProperty message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            TextProperty.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.detectedLanguages != null && message.hasOwnProperty("detectedLanguages")) {
                                    if (!Array.isArray(message.detectedLanguages))
                                        return "detectedLanguages: array expected";
                                    for (var i = 0; i < message.detectedLanguages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.verify(message.detectedLanguages[i]);
                                        if (error)
                                            return "detectedLanguages." + error;
                                    }
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak")) {
                                    var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.verify(message.detectedBreak);
                                    if (error)
                                        return "detectedBreak." + error;
                                }
                                return null;
                            };
    
                            /**
                             * Creates a TextProperty message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} TextProperty
                             */
                            TextProperty.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty();
                                if (object.detectedLanguages) {
                                    if (!Array.isArray(object.detectedLanguages))
                                        throw TypeError(".google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.detectedLanguages: array expected");
                                    message.detectedLanguages = [];
                                    for (var i = 0; i < object.detectedLanguages.length; ++i) {
                                        if (typeof object.detectedLanguages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.detectedLanguages: object expected");
                                        message.detectedLanguages[i] = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.fromObject(object.detectedLanguages[i]);
                                    }
                                }
                                if (object.detectedBreak != null) {
                                    if (typeof object.detectedBreak !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.detectedBreak: object expected");
                                    message.detectedBreak = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.fromObject(object.detectedBreak);
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a TextProperty message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty} message TextProperty
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            TextProperty.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults)
                                    object.detectedLanguages = [];
                                if (options.defaults)
                                    object.detectedBreak = null;
                                if (message.detectedLanguages && message.detectedLanguages.length) {
                                    object.detectedLanguages = [];
                                    for (var j = 0; j < message.detectedLanguages.length; ++j)
                                        object.detectedLanguages[j] = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.toObject(message.detectedLanguages[j], options);
                                }
                                if (message.detectedBreak != null && message.hasOwnProperty("detectedBreak"))
                                    object.detectedBreak = $root.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.toObject(message.detectedBreak, options);
                                return object;
                            };
    
                            /**
                             * Converts this TextProperty to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            TextProperty.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for TextProperty
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            TextProperty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty";
                            };
    
                            return TextProperty;
                        })();
    
                        return TextAnnotation;
                    })();
    
                    v1p4beta1.Page = (function() {
    
                        /**
                         * Properties of a Page.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IPage
                         * @property {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null} [property] Page property
                         * @property {number|null} [width] Page width
                         * @property {number|null} [height] Page height
                         * @property {Array.<google.cloud.vision.v1p4beta1.IBlock>|null} [blocks] Page blocks
                         * @property {number|null} [confidence] Page confidence
                         */
    
                        /**
                         * Constructs a new Page.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Page.
                         * @implements IPage
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IPage=} [properties] Properties to set
                         */
                        function Page(properties) {
                            this.blocks = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Page property.
                         * @member {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         */
                        Page.prototype.property = null;
    
                        /**
                         * Page width.
                         * @member {number} width
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         */
                        Page.prototype.width = 0;
    
                        /**
                         * Page height.
                         * @member {number} height
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         */
                        Page.prototype.height = 0;
    
                        /**
                         * Page blocks.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IBlock>} blocks
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         */
                        Page.prototype.blocks = $util.emptyArray;
    
                        /**
                         * Page confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         */
                        Page.prototype.confidence = 0;
    
                        /**
                         * Creates a new Page instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPage=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Page} Page instance
                         */
                        Page.create = function create(properties) {
                            return new Page(properties);
                        };
    
                        /**
                         * Encodes the specified Page message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Page.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.width != null && Object.hasOwnProperty.call(message, "width"))
                                writer.uint32(/* id 2, wireType 0 =*/16).int32(message.width);
                            if (message.height != null && Object.hasOwnProperty.call(message, "height"))
                                writer.uint32(/* id 3, wireType 0 =*/24).int32(message.height);
                            if (message.blocks != null && message.blocks.length)
                                for (var i = 0; i < message.blocks.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Block.encode(message.blocks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Page message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Page.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IPage} message Page message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Page.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Page();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.width = reader.int32();
                                        break;
                                    }
                                case 3: {
                                        message.height = reader.int32();
                                        break;
                                    }
                                case 4: {
                                        if (!(message.blocks && message.blocks.length))
                                            message.blocks = [];
                                        message.blocks.push($root.google.cloud.vision.v1p4beta1.Block.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Page message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Page} Page
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Page.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Page message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Page.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.width != null && message.hasOwnProperty("width"))
                                if (!$util.isInteger(message.width))
                                    return "width: integer expected";
                            if (message.height != null && message.hasOwnProperty("height"))
                                if (!$util.isInteger(message.height))
                                    return "height: integer expected";
                            if (message.blocks != null && message.hasOwnProperty("blocks")) {
                                if (!Array.isArray(message.blocks))
                                    return "blocks: array expected";
                                for (var i = 0; i < message.blocks.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Block.verify(message.blocks[i]);
                                    if (error)
                                        return "blocks." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Page message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Page} Page
                         */
                        Page.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Page)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Page();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Page.property: object expected");
                                message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.width != null)
                                message.width = object.width | 0;
                            if (object.height != null)
                                message.height = object.height | 0;
                            if (object.blocks) {
                                if (!Array.isArray(object.blocks))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Page.blocks: array expected");
                                message.blocks = [];
                                for (var i = 0; i < object.blocks.length; ++i) {
                                    if (typeof object.blocks[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.Page.blocks: object expected");
                                    message.blocks[i] = $root.google.cloud.vision.v1p4beta1.Block.fromObject(object.blocks[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Page message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Page} message Page
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Page.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.blocks = [];
                            if (options.defaults) {
                                object.property = null;
                                object.width = 0;
                                object.height = 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.width != null && message.hasOwnProperty("width"))
                                object.width = message.width;
                            if (message.height != null && message.hasOwnProperty("height"))
                                object.height = message.height;
                            if (message.blocks && message.blocks.length) {
                                object.blocks = [];
                                for (var j = 0; j < message.blocks.length; ++j)
                                    object.blocks[j] = $root.google.cloud.vision.v1p4beta1.Block.toObject(message.blocks[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Page to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Page.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Page
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Page
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Page.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Page";
                        };
    
                        return Page;
                    })();
    
                    v1p4beta1.Block = (function() {
    
                        /**
                         * Properties of a Block.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IBlock
                         * @property {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null} [property] Block property
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingBox] Block boundingBox
                         * @property {Array.<google.cloud.vision.v1p4beta1.IParagraph>|null} [paragraphs] Block paragraphs
                         * @property {google.cloud.vision.v1p4beta1.Block.BlockType|null} [blockType] Block blockType
                         * @property {number|null} [confidence] Block confidence
                         */
    
                        /**
                         * Constructs a new Block.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Block.
                         * @implements IBlock
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IBlock=} [properties] Properties to set
                         */
                        function Block(properties) {
                            this.paragraphs = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Block property.
                         * @member {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         */
                        Block.prototype.property = null;
    
                        /**
                         * Block boundingBox.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         */
                        Block.prototype.boundingBox = null;
    
                        /**
                         * Block paragraphs.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IParagraph>} paragraphs
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         */
                        Block.prototype.paragraphs = $util.emptyArray;
    
                        /**
                         * Block blockType.
                         * @member {google.cloud.vision.v1p4beta1.Block.BlockType} blockType
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         */
                        Block.prototype.blockType = 0;
    
                        /**
                         * Block confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         */
                        Block.prototype.confidence = 0;
    
                        /**
                         * Creates a new Block instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBlock=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Block} Block instance
                         */
                        Block.create = function create(properties) {
                            return new Block(properties);
                        };
    
                        /**
                         * Encodes the specified Block message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Block.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.paragraphs != null && message.paragraphs.length)
                                for (var i = 0; i < message.paragraphs.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Paragraph.encode(message.paragraphs[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.blockType != null && Object.hasOwnProperty.call(message, "blockType"))
                                writer.uint32(/* id 4, wireType 0 =*/32).int32(message.blockType);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 5, wireType 5 =*/45).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Block message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Block.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IBlock} message Block message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Block.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Block();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.paragraphs && message.paragraphs.length))
                                            message.paragraphs = [];
                                        message.paragraphs.push($root.google.cloud.vision.v1p4beta1.Paragraph.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.blockType = reader.int32();
                                        break;
                                    }
                                case 5: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Block message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Block} Block
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Block.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Block message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Block.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.paragraphs != null && message.hasOwnProperty("paragraphs")) {
                                if (!Array.isArray(message.paragraphs))
                                    return "paragraphs: array expected";
                                for (var i = 0; i < message.paragraphs.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Paragraph.verify(message.paragraphs[i]);
                                    if (error)
                                        return "paragraphs." + error;
                                }
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                switch (message.blockType) {
                                default:
                                    return "blockType: enum value expected";
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                case 4:
                                case 5:
                                    break;
                                }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Block message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Block} Block
                         */
                        Block.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Block)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Block();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Block.property: object expected");
                                message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Block.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.paragraphs) {
                                if (!Array.isArray(object.paragraphs))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Block.paragraphs: array expected");
                                message.paragraphs = [];
                                for (var i = 0; i < object.paragraphs.length; ++i) {
                                    if (typeof object.paragraphs[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.Block.paragraphs: object expected");
                                    message.paragraphs[i] = $root.google.cloud.vision.v1p4beta1.Paragraph.fromObject(object.paragraphs[i]);
                                }
                            }
                            switch (object.blockType) {
                            default:
                                if (typeof object.blockType === "number") {
                                    message.blockType = object.blockType;
                                    break;
                                }
                                break;
                            case "UNKNOWN":
                            case 0:
                                message.blockType = 0;
                                break;
                            case "TEXT":
                            case 1:
                                message.blockType = 1;
                                break;
                            case "TABLE":
                            case 2:
                                message.blockType = 2;
                                break;
                            case "PICTURE":
                            case 3:
                                message.blockType = 3;
                                break;
                            case "RULER":
                            case 4:
                                message.blockType = 4;
                                break;
                            case "BARCODE":
                            case 5:
                                message.blockType = 5;
                                break;
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Block message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Block} message Block
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Block.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.paragraphs = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.blockType = options.enums === String ? "UNKNOWN" : 0;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.paragraphs && message.paragraphs.length) {
                                object.paragraphs = [];
                                for (var j = 0; j < message.paragraphs.length; ++j)
                                    object.paragraphs[j] = $root.google.cloud.vision.v1p4beta1.Paragraph.toObject(message.paragraphs[j], options);
                            }
                            if (message.blockType != null && message.hasOwnProperty("blockType"))
                                object.blockType = options.enums === String ? $root.google.cloud.vision.v1p4beta1.Block.BlockType[message.blockType] === undefined ? message.blockType : $root.google.cloud.vision.v1p4beta1.Block.BlockType[message.blockType] : message.blockType;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Block to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Block.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Block
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Block
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Block.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Block";
                        };
    
                        /**
                         * BlockType enum.
                         * @name google.cloud.vision.v1p4beta1.Block.BlockType
                         * @enum {number}
                         * @property {number} UNKNOWN=0 UNKNOWN value
                         * @property {number} TEXT=1 TEXT value
                         * @property {number} TABLE=2 TABLE value
                         * @property {number} PICTURE=3 PICTURE value
                         * @property {number} RULER=4 RULER value
                         * @property {number} BARCODE=5 BARCODE value
                         */
                        Block.BlockType = (function() {
                            var valuesById = {}, values = Object.create(valuesById);
                            values[valuesById[0] = "UNKNOWN"] = 0;
                            values[valuesById[1] = "TEXT"] = 1;
                            values[valuesById[2] = "TABLE"] = 2;
                            values[valuesById[3] = "PICTURE"] = 3;
                            values[valuesById[4] = "RULER"] = 4;
                            values[valuesById[5] = "BARCODE"] = 5;
                            return values;
                        })();
    
                        return Block;
                    })();
    
                    v1p4beta1.Paragraph = (function() {
    
                        /**
                         * Properties of a Paragraph.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IParagraph
                         * @property {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null} [property] Paragraph property
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingBox] Paragraph boundingBox
                         * @property {Array.<google.cloud.vision.v1p4beta1.IWord>|null} [words] Paragraph words
                         * @property {number|null} [confidence] Paragraph confidence
                         */
    
                        /**
                         * Constructs a new Paragraph.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Paragraph.
                         * @implements IParagraph
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IParagraph=} [properties] Properties to set
                         */
                        function Paragraph(properties) {
                            this.words = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Paragraph property.
                         * @member {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.property = null;
    
                        /**
                         * Paragraph boundingBox.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.boundingBox = null;
    
                        /**
                         * Paragraph words.
                         * @member {Array.<google.cloud.vision.v1p4beta1.IWord>} words
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.words = $util.emptyArray;
    
                        /**
                         * Paragraph confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @instance
                         */
                        Paragraph.prototype.confidence = 0;
    
                        /**
                         * Creates a new Paragraph instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IParagraph=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Paragraph} Paragraph instance
                         */
                        Paragraph.create = function create(properties) {
                            return new Paragraph(properties);
                        };
    
                        /**
                         * Encodes the specified Paragraph message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Paragraph.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.words != null && message.words.length)
                                for (var i = 0; i < message.words.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Word.encode(message.words[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Paragraph message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Paragraph.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IParagraph} message Paragraph message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Paragraph.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Paragraph();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.words && message.words.length))
                                            message.words = [];
                                        message.words.push($root.google.cloud.vision.v1p4beta1.Word.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Paragraph message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Paragraph} Paragraph
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Paragraph.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Paragraph message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Paragraph.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.words != null && message.hasOwnProperty("words")) {
                                if (!Array.isArray(message.words))
                                    return "words: array expected";
                                for (var i = 0; i < message.words.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Word.verify(message.words[i]);
                                    if (error)
                                        return "words." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Paragraph message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Paragraph} Paragraph
                         */
                        Paragraph.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Paragraph)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Paragraph();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Paragraph.property: object expected");
                                message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Paragraph.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.words) {
                                if (!Array.isArray(object.words))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Paragraph.words: array expected");
                                message.words = [];
                                for (var i = 0; i < object.words.length; ++i) {
                                    if (typeof object.words[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.Paragraph.words: object expected");
                                    message.words[i] = $root.google.cloud.vision.v1p4beta1.Word.fromObject(object.words[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Paragraph message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Paragraph} message Paragraph
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Paragraph.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.words = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.words && message.words.length) {
                                object.words = [];
                                for (var j = 0; j < message.words.length; ++j)
                                    object.words[j] = $root.google.cloud.vision.v1p4beta1.Word.toObject(message.words[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Paragraph to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Paragraph.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Paragraph
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Paragraph
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Paragraph.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Paragraph";
                        };
    
                        return Paragraph;
                    })();
    
                    v1p4beta1.Word = (function() {
    
                        /**
                         * Properties of a Word.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IWord
                         * @property {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null} [property] Word property
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingBox] Word boundingBox
                         * @property {Array.<google.cloud.vision.v1p4beta1.ISymbol>|null} [symbols] Word symbols
                         * @property {number|null} [confidence] Word confidence
                         */
    
                        /**
                         * Constructs a new Word.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Word.
                         * @implements IWord
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IWord=} [properties] Properties to set
                         */
                        function Word(properties) {
                            this.symbols = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Word property.
                         * @member {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @instance
                         */
                        Word.prototype.property = null;
    
                        /**
                         * Word boundingBox.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @instance
                         */
                        Word.prototype.boundingBox = null;
    
                        /**
                         * Word symbols.
                         * @member {Array.<google.cloud.vision.v1p4beta1.ISymbol>} symbols
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @instance
                         */
                        Word.prototype.symbols = $util.emptyArray;
    
                        /**
                         * Word confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @instance
                         */
                        Word.prototype.confidence = 0;
    
                        /**
                         * Creates a new Word instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWord=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Word} Word instance
                         */
                        Word.create = function create(properties) {
                            return new Word(properties);
                        };
    
                        /**
                         * Encodes the specified Word message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Word.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.symbols != null && message.symbols.length)
                                for (var i = 0; i < message.symbols.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.Symbol.encode(message.symbols[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Word message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Word.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWord} message Word message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Word.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Word();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        if (!(message.symbols && message.symbols.length))
                                            message.symbols = [];
                                        message.symbols.push($root.google.cloud.vision.v1p4beta1.Symbol.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Word message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Word} Word
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Word.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Word message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Word.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.symbols != null && message.hasOwnProperty("symbols")) {
                                if (!Array.isArray(message.symbols))
                                    return "symbols: array expected";
                                for (var i = 0; i < message.symbols.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.Symbol.verify(message.symbols[i]);
                                    if (error)
                                        return "symbols." + error;
                                }
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Word message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Word} Word
                         */
                        Word.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Word)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Word();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Word.property: object expected");
                                message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Word.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.symbols) {
                                if (!Array.isArray(object.symbols))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Word.symbols: array expected");
                                message.symbols = [];
                                for (var i = 0; i < object.symbols.length; ++i) {
                                    if (typeof object.symbols[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.Word.symbols: object expected");
                                    message.symbols[i] = $root.google.cloud.vision.v1p4beta1.Symbol.fromObject(object.symbols[i]);
                                }
                            }
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Word message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Word} message Word
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Word.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults)
                                object.symbols = [];
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.symbols && message.symbols.length) {
                                object.symbols = [];
                                for (var j = 0; j < message.symbols.length; ++j)
                                    object.symbols[j] = $root.google.cloud.vision.v1p4beta1.Symbol.toObject(message.symbols[j], options);
                            }
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Word to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Word.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Word
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Word
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Word.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Word";
                        };
    
                        return Word;
                    })();
    
                    v1p4beta1.Symbol = (function() {
    
                        /**
                         * Properties of a Symbol.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface ISymbol
                         * @property {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null} [property] Symbol property
                         * @property {google.cloud.vision.v1p4beta1.IBoundingPoly|null} [boundingBox] Symbol boundingBox
                         * @property {string|null} [text] Symbol text
                         * @property {number|null} [confidence] Symbol confidence
                         */
    
                        /**
                         * Constructs a new Symbol.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a Symbol.
                         * @implements ISymbol
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.ISymbol=} [properties] Properties to set
                         */
                        function Symbol(properties) {
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * Symbol property.
                         * @member {google.cloud.vision.v1p4beta1.TextAnnotation.ITextProperty|null|undefined} property
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.property = null;
    
                        /**
                         * Symbol boundingBox.
                         * @member {google.cloud.vision.v1p4beta1.IBoundingPoly|null|undefined} boundingBox
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.boundingBox = null;
    
                        /**
                         * Symbol text.
                         * @member {string} text
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.text = "";
    
                        /**
                         * Symbol confidence.
                         * @member {number} confidence
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @instance
                         */
                        Symbol.prototype.confidence = 0;
    
                        /**
                         * Creates a new Symbol instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISymbol=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.Symbol} Symbol instance
                         */
                        Symbol.create = function create(properties) {
                            return new Symbol(properties);
                        };
    
                        /**
                         * Encodes the specified Symbol message. Does not implicitly {@link google.cloud.vision.v1p4beta1.Symbol.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.property != null && Object.hasOwnProperty.call(message, "property"))
                                $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.encode(message.property, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.boundingBox != null && Object.hasOwnProperty.call(message, "boundingBox"))
                                $root.google.cloud.vision.v1p4beta1.BoundingPoly.encode(message.boundingBox, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.text != null && Object.hasOwnProperty.call(message, "text"))
                                writer.uint32(/* id 3, wireType 2 =*/26).string(message.text);
                            if (message.confidence != null && Object.hasOwnProperty.call(message, "confidence"))
                                writer.uint32(/* id 4, wireType 5 =*/37).float(message.confidence);
                            return writer;
                        };
    
                        /**
                         * Encodes the specified Symbol message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.Symbol.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.ISymbol} message Symbol message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        Symbol.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.Symbol();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 2: {
                                        message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.decode(reader, reader.uint32());
                                        break;
                                    }
                                case 3: {
                                        message.text = reader.string();
                                        break;
                                    }
                                case 4: {
                                        message.confidence = reader.float();
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a Symbol message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.Symbol} Symbol
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        Symbol.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a Symbol message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        Symbol.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.property != null && message.hasOwnProperty("property")) {
                                var error = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.verify(message.property);
                                if (error)
                                    return "property." + error;
                            }
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox")) {
                                var error = $root.google.cloud.vision.v1p4beta1.BoundingPoly.verify(message.boundingBox);
                                if (error)
                                    return "boundingBox." + error;
                            }
                            if (message.text != null && message.hasOwnProperty("text"))
                                if (!$util.isString(message.text))
                                    return "text: string expected";
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                if (typeof message.confidence !== "number")
                                    return "confidence: number expected";
                            return null;
                        };
    
                        /**
                         * Creates a Symbol message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.Symbol} Symbol
                         */
                        Symbol.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.Symbol)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.Symbol();
                            if (object.property != null) {
                                if (typeof object.property !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Symbol.property: object expected");
                                message.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.fromObject(object.property);
                            }
                            if (object.boundingBox != null) {
                                if (typeof object.boundingBox !== "object")
                                    throw TypeError(".google.cloud.vision.v1p4beta1.Symbol.boundingBox: object expected");
                                message.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.fromObject(object.boundingBox);
                            }
                            if (object.text != null)
                                message.text = String(object.text);
                            if (object.confidence != null)
                                message.confidence = Number(object.confidence);
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a Symbol message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.Symbol} message Symbol
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        Symbol.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.defaults) {
                                object.property = null;
                                object.boundingBox = null;
                                object.text = "";
                                object.confidence = 0;
                            }
                            if (message.property != null && message.hasOwnProperty("property"))
                                object.property = $root.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.toObject(message.property, options);
                            if (message.boundingBox != null && message.hasOwnProperty("boundingBox"))
                                object.boundingBox = $root.google.cloud.vision.v1p4beta1.BoundingPoly.toObject(message.boundingBox, options);
                            if (message.text != null && message.hasOwnProperty("text"))
                                object.text = message.text;
                            if (message.confidence != null && message.hasOwnProperty("confidence"))
                                object.confidence = options.json && !isFinite(message.confidence) ? String(message.confidence) : message.confidence;
                            return object;
                        };
    
                        /**
                         * Converts this Symbol to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        Symbol.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for Symbol
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.Symbol
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        Symbol.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.Symbol";
                        };
    
                        return Symbol;
                    })();
    
                    v1p4beta1.WebDetection = (function() {
    
                        /**
                         * Properties of a WebDetection.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @interface IWebDetection
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebEntity>|null} [webEntities] WebDetection webEntities
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebDetection fullMatchingImages
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebDetection partialMatchingImages
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebPage>|null} [pagesWithMatchingImages] WebDetection pagesWithMatchingImages
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>|null} [visuallySimilarImages] WebDetection visuallySimilarImages
                         * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebLabel>|null} [bestGuessLabels] WebDetection bestGuessLabels
                         */
    
                        /**
                         * Constructs a new WebDetection.
                         * @memberof google.cloud.vision.v1p4beta1
                         * @classdesc Represents a WebDetection.
                         * @implements IWebDetection
                         * @constructor
                         * @param {google.cloud.vision.v1p4beta1.IWebDetection=} [properties] Properties to set
                         */
                        function WebDetection(properties) {
                            this.webEntities = [];
                            this.fullMatchingImages = [];
                            this.partialMatchingImages = [];
                            this.pagesWithMatchingImages = [];
                            this.visuallySimilarImages = [];
                            this.bestGuessLabels = [];
                            if (properties)
                                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                    if (properties[keys[i]] != null)
                                        this[keys[i]] = properties[keys[i]];
                        }
    
                        /**
                         * WebDetection webEntities.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebEntity>} webEntities
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.webEntities = $util.emptyArray;
    
                        /**
                         * WebDetection fullMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>} fullMatchingImages
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.fullMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection partialMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>} partialMatchingImages
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.partialMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection pagesWithMatchingImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebPage>} pagesWithMatchingImages
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.pagesWithMatchingImages = $util.emptyArray;
    
                        /**
                         * WebDetection visuallySimilarImages.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>} visuallySimilarImages
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.visuallySimilarImages = $util.emptyArray;
    
                        /**
                         * WebDetection bestGuessLabels.
                         * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebLabel>} bestGuessLabels
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         */
                        WebDetection.prototype.bestGuessLabels = $util.emptyArray;
    
                        /**
                         * Creates a new WebDetection instance using the specified properties.
                         * @function create
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetection=} [properties] Properties to set
                         * @returns {google.cloud.vision.v1p4beta1.WebDetection} WebDetection instance
                         */
                        WebDetection.create = function create(properties) {
                            return new WebDetection(properties);
                        };
    
                        /**
                         * Encodes the specified WebDetection message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.verify|verify} messages.
                         * @function encode
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encode = function encode(message, writer) {
                            if (!writer)
                                writer = $Writer.create();
                            if (message.webEntities != null && message.webEntities.length)
                                for (var i = 0; i < message.webEntities.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.encode(message.webEntities[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                            if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                            if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                            if (message.pagesWithMatchingImages != null && message.pagesWithMatchingImages.length)
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage.encode(message.pagesWithMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                            if (message.visuallySimilarImages != null && message.visuallySimilarImages.length)
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.encode(message.visuallySimilarImages[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                            if (message.bestGuessLabels != null && message.bestGuessLabels.length)
                                for (var i = 0; i < message.bestGuessLabels.length; ++i)
                                    $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.encode(message.bestGuessLabels[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                            return writer;
                        };
    
                        /**
                         * Encodes the specified WebDetection message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.verify|verify} messages.
                         * @function encodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.IWebDetection} message WebDetection message or plain object to encode
                         * @param {$protobuf.Writer} [writer] Writer to encode to
                         * @returns {$protobuf.Writer} Writer
                         */
                        WebDetection.encodeDelimited = function encodeDelimited(message, writer) {
                            return this.encode(message, writer).ldelim();
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer.
                         * @function decode
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @param {number} [length] Message length if known beforehand
                         * @returns {google.cloud.vision.v1p4beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decode = function decode(reader, length) {
                            if (!(reader instanceof $Reader))
                                reader = $Reader.create(reader);
                            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetection();
                            while (reader.pos < end) {
                                var tag = reader.uint32();
                                switch (tag >>> 3) {
                                case 1: {
                                        if (!(message.webEntities && message.webEntities.length))
                                            message.webEntities = [];
                                        message.webEntities.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 2: {
                                        if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                            message.fullMatchingImages = [];
                                        message.fullMatchingImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 3: {
                                        if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                            message.partialMatchingImages = [];
                                        message.partialMatchingImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 4: {
                                        if (!(message.pagesWithMatchingImages && message.pagesWithMatchingImages.length))
                                            message.pagesWithMatchingImages = [];
                                        message.pagesWithMatchingImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebPage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 6: {
                                        if (!(message.visuallySimilarImages && message.visuallySimilarImages.length))
                                            message.visuallySimilarImages = [];
                                        message.visuallySimilarImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                        break;
                                    }
                                case 8: {
                                        if (!(message.bestGuessLabels && message.bestGuessLabels.length))
                                            message.bestGuessLabels = [];
                                        message.bestGuessLabels.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.decode(reader, reader.uint32()));
                                        break;
                                    }
                                default:
                                    reader.skipType(tag & 7);
                                    break;
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Decodes a WebDetection message from the specified reader or buffer, length delimited.
                         * @function decodeDelimited
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                         * @returns {google.cloud.vision.v1p4beta1.WebDetection} WebDetection
                         * @throws {Error} If the payload is not a reader or valid buffer
                         * @throws {$protobuf.util.ProtocolError} If required fields are missing
                         */
                        WebDetection.decodeDelimited = function decodeDelimited(reader) {
                            if (!(reader instanceof $Reader))
                                reader = new $Reader(reader);
                            return this.decode(reader, reader.uint32());
                        };
    
                        /**
                         * Verifies a WebDetection message.
                         * @function verify
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} message Plain object to verify
                         * @returns {string|null} `null` if valid, otherwise the reason why it is not
                         */
                        WebDetection.verify = function verify(message) {
                            if (typeof message !== "object" || message === null)
                                return "object expected";
                            if (message.webEntities != null && message.hasOwnProperty("webEntities")) {
                                if (!Array.isArray(message.webEntities))
                                    return "webEntities: array expected";
                                for (var i = 0; i < message.webEntities.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.verify(message.webEntities[i]);
                                    if (error)
                                        return "webEntities." + error;
                                }
                            }
                            if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                if (!Array.isArray(message.fullMatchingImages))
                                    return "fullMatchingImages: array expected";
                                for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                    if (error)
                                        return "fullMatchingImages." + error;
                                }
                            }
                            if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                if (!Array.isArray(message.partialMatchingImages))
                                    return "partialMatchingImages: array expected";
                                for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                    if (error)
                                        return "partialMatchingImages." + error;
                                }
                            }
                            if (message.pagesWithMatchingImages != null && message.hasOwnProperty("pagesWithMatchingImages")) {
                                if (!Array.isArray(message.pagesWithMatchingImages))
                                    return "pagesWithMatchingImages: array expected";
                                for (var i = 0; i < message.pagesWithMatchingImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage.verify(message.pagesWithMatchingImages[i]);
                                    if (error)
                                        return "pagesWithMatchingImages." + error;
                                }
                            }
                            if (message.visuallySimilarImages != null && message.hasOwnProperty("visuallySimilarImages")) {
                                if (!Array.isArray(message.visuallySimilarImages))
                                    return "visuallySimilarImages: array expected";
                                for (var i = 0; i < message.visuallySimilarImages.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify(message.visuallySimilarImages[i]);
                                    if (error)
                                        return "visuallySimilarImages." + error;
                                }
                            }
                            if (message.bestGuessLabels != null && message.hasOwnProperty("bestGuessLabels")) {
                                if (!Array.isArray(message.bestGuessLabels))
                                    return "bestGuessLabels: array expected";
                                for (var i = 0; i < message.bestGuessLabels.length; ++i) {
                                    var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.verify(message.bestGuessLabels[i]);
                                    if (error)
                                        return "bestGuessLabels." + error;
                                }
                            }
                            return null;
                        };
    
                        /**
                         * Creates a WebDetection message from a plain object. Also converts values to their respective internal types.
                         * @function fromObject
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {Object.<string,*>} object Plain object
                         * @returns {google.cloud.vision.v1p4beta1.WebDetection} WebDetection
                         */
                        WebDetection.fromObject = function fromObject(object) {
                            if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetection)
                                return object;
                            var message = new $root.google.cloud.vision.v1p4beta1.WebDetection();
                            if (object.webEntities) {
                                if (!Array.isArray(object.webEntities))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.webEntities: array expected");
                                message.webEntities = [];
                                for (var i = 0; i < object.webEntities.length; ++i) {
                                    if (typeof object.webEntities[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.webEntities: object expected");
                                    message.webEntities[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.fromObject(object.webEntities[i]);
                                }
                            }
                            if (object.fullMatchingImages) {
                                if (!Array.isArray(object.fullMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.fullMatchingImages: array expected");
                                message.fullMatchingImages = [];
                                for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                    if (typeof object.fullMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.fullMatchingImages: object expected");
                                    message.fullMatchingImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                }
                            }
                            if (object.partialMatchingImages) {
                                if (!Array.isArray(object.partialMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.partialMatchingImages: array expected");
                                message.partialMatchingImages = [];
                                for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                    if (typeof object.partialMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.partialMatchingImages: object expected");
                                    message.partialMatchingImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                }
                            }
                            if (object.pagesWithMatchingImages) {
                                if (!Array.isArray(object.pagesWithMatchingImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.pagesWithMatchingImages: array expected");
                                message.pagesWithMatchingImages = [];
                                for (var i = 0; i < object.pagesWithMatchingImages.length; ++i) {
                                    if (typeof object.pagesWithMatchingImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.pagesWithMatchingImages: object expected");
                                    message.pagesWithMatchingImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage.fromObject(object.pagesWithMatchingImages[i]);
                                }
                            }
                            if (object.visuallySimilarImages) {
                                if (!Array.isArray(object.visuallySimilarImages))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.visuallySimilarImages: array expected");
                                message.visuallySimilarImages = [];
                                for (var i = 0; i < object.visuallySimilarImages.length; ++i) {
                                    if (typeof object.visuallySimilarImages[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.visuallySimilarImages: object expected");
                                    message.visuallySimilarImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.fromObject(object.visuallySimilarImages[i]);
                                }
                            }
                            if (object.bestGuessLabels) {
                                if (!Array.isArray(object.bestGuessLabels))
                                    throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.bestGuessLabels: array expected");
                                message.bestGuessLabels = [];
                                for (var i = 0; i < object.bestGuessLabels.length; ++i) {
                                    if (typeof object.bestGuessLabels[i] !== "object")
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.bestGuessLabels: object expected");
                                    message.bestGuessLabels[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.fromObject(object.bestGuessLabels[i]);
                                }
                            }
                            return message;
                        };
    
                        /**
                         * Creates a plain object from a WebDetection message. Also converts values to other types if specified.
                         * @function toObject
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {google.cloud.vision.v1p4beta1.WebDetection} message WebDetection
                         * @param {$protobuf.IConversionOptions} [options] Conversion options
                         * @returns {Object.<string,*>} Plain object
                         */
                        WebDetection.toObject = function toObject(message, options) {
                            if (!options)
                                options = {};
                            var object = {};
                            if (options.arrays || options.defaults) {
                                object.webEntities = [];
                                object.fullMatchingImages = [];
                                object.partialMatchingImages = [];
                                object.pagesWithMatchingImages = [];
                                object.visuallySimilarImages = [];
                                object.bestGuessLabels = [];
                            }
                            if (message.webEntities && message.webEntities.length) {
                                object.webEntities = [];
                                for (var j = 0; j < message.webEntities.length; ++j)
                                    object.webEntities[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.toObject(message.webEntities[j], options);
                            }
                            if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                object.fullMatchingImages = [];
                                for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                    object.fullMatchingImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                            }
                            if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                object.partialMatchingImages = [];
                                for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                    object.partialMatchingImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                            }
                            if (message.pagesWithMatchingImages && message.pagesWithMatchingImages.length) {
                                object.pagesWithMatchingImages = [];
                                for (var j = 0; j < message.pagesWithMatchingImages.length; ++j)
                                    object.pagesWithMatchingImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage.toObject(message.pagesWithMatchingImages[j], options);
                            }
                            if (message.visuallySimilarImages && message.visuallySimilarImages.length) {
                                object.visuallySimilarImages = [];
                                for (var j = 0; j < message.visuallySimilarImages.length; ++j)
                                    object.visuallySimilarImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.toObject(message.visuallySimilarImages[j], options);
                            }
                            if (message.bestGuessLabels && message.bestGuessLabels.length) {
                                object.bestGuessLabels = [];
                                for (var j = 0; j < message.bestGuessLabels.length; ++j)
                                    object.bestGuessLabels[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.toObject(message.bestGuessLabels[j], options);
                            }
                            return object;
                        };
    
                        /**
                         * Converts this WebDetection to JSON.
                         * @function toJSON
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @instance
                         * @returns {Object.<string,*>} JSON object
                         */
                        WebDetection.prototype.toJSON = function toJSON() {
                            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                        };
    
                        /**
                         * Gets the default type url for WebDetection
                         * @function getTypeUrl
                         * @memberof google.cloud.vision.v1p4beta1.WebDetection
                         * @static
                         * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                         * @returns {string} The default type url
                         */
                        WebDetection.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                            if (typeUrlPrefix === undefined) {
                                typeUrlPrefix = "type.googleapis.com";
                            }
                            return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetection";
                        };
    
                        WebDetection.WebEntity = (function() {
    
                            /**
                             * Properties of a WebEntity.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @interface IWebEntity
                             * @property {string|null} [entityId] WebEntity entityId
                             * @property {number|null} [score] WebEntity score
                             * @property {string|null} [description] WebEntity description
                             */
    
                            /**
                             * Constructs a new WebEntity.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @classdesc Represents a WebEntity.
                             * @implements IWebEntity
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             */
                            function WebEntity(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebEntity entityId.
                             * @member {string} entityId
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.entityId = "";
    
                            /**
                             * WebEntity score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.score = 0;
    
                            /**
                             * WebEntity description.
                             * @member {string} description
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @instance
                             */
                            WebEntity.prototype.description = "";
    
                            /**
                             * Creates a new WebEntity instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebEntity=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebEntity} WebEntity instance
                             */
                            WebEntity.create = function create(properties) {
                                return new WebEntity(properties);
                            };
    
                            /**
                             * Encodes the specified WebEntity message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.entityId != null && Object.hasOwnProperty.call(message, "entityId"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.entityId);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.description != null && Object.hasOwnProperty.call(message, "description"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.description);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebEntity message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebEntity.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebEntity} message WebEntity message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebEntity.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.entityId = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.description = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebEntity message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebEntity} WebEntity
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebEntity.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebEntity message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebEntity.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    if (!$util.isString(message.entityId))
                                        return "entityId: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.description != null && message.hasOwnProperty("description"))
                                    if (!$util.isString(message.description))
                                        return "description: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebEntity message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebEntity} WebEntity
                             */
                            WebEntity.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebEntity();
                                if (object.entityId != null)
                                    message.entityId = String(object.entityId);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.description != null)
                                    message.description = String(object.description);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebEntity message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.WebEntity} message WebEntity
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebEntity.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.entityId = "";
                                    object.score = 0;
                                    object.description = "";
                                }
                                if (message.entityId != null && message.hasOwnProperty("entityId"))
                                    object.entityId = message.entityId;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.description != null && message.hasOwnProperty("description"))
                                    object.description = message.description;
                                return object;
                            };
    
                            /**
                             * Converts this WebEntity to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebEntity.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebEntity
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebEntity
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebEntity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetection.WebEntity";
                            };
    
                            return WebEntity;
                        })();
    
                        WebDetection.WebImage = (function() {
    
                            /**
                             * Properties of a WebImage.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @interface IWebImage
                             * @property {string|null} [url] WebImage url
                             * @property {number|null} [score] WebImage score
                             */
    
                            /**
                             * Constructs a new WebImage.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @classdesc Represents a WebImage.
                             * @implements IWebImage
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebImage=} [properties] Properties to set
                             */
                            function WebImage(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebImage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.url = "";
    
                            /**
                             * WebImage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @instance
                             */
                            WebImage.prototype.score = 0;
    
                            /**
                             * Creates a new WebImage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebImage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebImage} WebImage instance
                             */
                            WebImage.create = function create(properties) {
                                return new WebImage(properties);
                            };
    
                            /**
                             * Encodes the specified WebImage message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebImage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebImage} message WebImage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebImage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebImage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebImage} WebImage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebImage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebImage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebImage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebImage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebImage} WebImage
                             */
                            WebImage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebImage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.WebImage} message WebImage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebImage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                return object;
                            };
    
                            /**
                             * Converts this WebImage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebImage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebImage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebImage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebImage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetection.WebImage";
                            };
    
                            return WebImage;
                        })();
    
                        WebDetection.WebPage = (function() {
    
                            /**
                             * Properties of a WebPage.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @interface IWebPage
                             * @property {string|null} [url] WebPage url
                             * @property {number|null} [score] WebPage score
                             * @property {string|null} [pageTitle] WebPage pageTitle
                             * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>|null} [fullMatchingImages] WebPage fullMatchingImages
                             * @property {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>|null} [partialMatchingImages] WebPage partialMatchingImages
                             */
    
                            /**
                             * Constructs a new WebPage.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @classdesc Represents a WebPage.
                             * @implements IWebPage
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebPage=} [properties] Properties to set
                             */
                            function WebPage(properties) {
                                this.fullMatchingImages = [];
                                this.partialMatchingImages = [];
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebPage url.
                             * @member {string} url
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.url = "";
    
                            /**
                             * WebPage score.
                             * @member {number} score
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.score = 0;
    
                            /**
                             * WebPage pageTitle.
                             * @member {string} pageTitle
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.pageTitle = "";
    
                            /**
                             * WebPage fullMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>} fullMatchingImages
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.fullMatchingImages = $util.emptyArray;
    
                            /**
                             * WebPage partialMatchingImages.
                             * @member {Array.<google.cloud.vision.v1p4beta1.WebDetection.IWebImage>} partialMatchingImages
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             */
                            WebPage.prototype.partialMatchingImages = $util.emptyArray;
    
                            /**
                             * Creates a new WebPage instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebPage=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebPage} WebPage instance
                             */
                            WebPage.create = function create(properties) {
                                return new WebPage(properties);
                            };
    
                            /**
                             * Encodes the specified WebPage message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.url != null && Object.hasOwnProperty.call(message, "url"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.url);
                                if (message.score != null && Object.hasOwnProperty.call(message, "score"))
                                    writer.uint32(/* id 2, wireType 5 =*/21).float(message.score);
                                if (message.pageTitle != null && Object.hasOwnProperty.call(message, "pageTitle"))
                                    writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageTitle);
                                if (message.fullMatchingImages != null && message.fullMatchingImages.length)
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.encode(message.fullMatchingImages[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                                if (message.partialMatchingImages != null && message.partialMatchingImages.length)
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i)
                                        $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.encode(message.partialMatchingImages[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebPage message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebPage.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebPage} message WebPage message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebPage.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.url = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.score = reader.float();
                                            break;
                                        }
                                    case 3: {
                                            message.pageTitle = reader.string();
                                            break;
                                        }
                                    case 4: {
                                            if (!(message.fullMatchingImages && message.fullMatchingImages.length))
                                                message.fullMatchingImages = [];
                                            message.fullMatchingImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    case 5: {
                                            if (!(message.partialMatchingImages && message.partialMatchingImages.length))
                                                message.partialMatchingImages = [];
                                            message.partialMatchingImages.push($root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.decode(reader, reader.uint32()));
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebPage message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebPage} WebPage
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebPage.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebPage message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebPage.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.url != null && message.hasOwnProperty("url"))
                                    if (!$util.isString(message.url))
                                        return "url: string expected";
                                if (message.score != null && message.hasOwnProperty("score"))
                                    if (typeof message.score !== "number")
                                        return "score: number expected";
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    if (!$util.isString(message.pageTitle))
                                        return "pageTitle: string expected";
                                if (message.fullMatchingImages != null && message.hasOwnProperty("fullMatchingImages")) {
                                    if (!Array.isArray(message.fullMatchingImages))
                                        return "fullMatchingImages: array expected";
                                    for (var i = 0; i < message.fullMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify(message.fullMatchingImages[i]);
                                        if (error)
                                            return "fullMatchingImages." + error;
                                    }
                                }
                                if (message.partialMatchingImages != null && message.hasOwnProperty("partialMatchingImages")) {
                                    if (!Array.isArray(message.partialMatchingImages))
                                        return "partialMatchingImages: array expected";
                                    for (var i = 0; i < message.partialMatchingImages.length; ++i) {
                                        var error = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.verify(message.partialMatchingImages[i]);
                                        if (error)
                                            return "partialMatchingImages." + error;
                                    }
                                }
                                return null;
                            };
    
                            /**
                             * Creates a WebPage message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebPage} WebPage
                             */
                            WebPage.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebPage();
                                if (object.url != null)
                                    message.url = String(object.url);
                                if (object.score != null)
                                    message.score = Number(object.score);
                                if (object.pageTitle != null)
                                    message.pageTitle = String(object.pageTitle);
                                if (object.fullMatchingImages) {
                                    if (!Array.isArray(object.fullMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.WebPage.fullMatchingImages: array expected");
                                    message.fullMatchingImages = [];
                                    for (var i = 0; i < object.fullMatchingImages.length; ++i) {
                                        if (typeof object.fullMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.WebPage.fullMatchingImages: object expected");
                                        message.fullMatchingImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.fromObject(object.fullMatchingImages[i]);
                                    }
                                }
                                if (object.partialMatchingImages) {
                                    if (!Array.isArray(object.partialMatchingImages))
                                        throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.WebPage.partialMatchingImages: array expected");
                                    message.partialMatchingImages = [];
                                    for (var i = 0; i < object.partialMatchingImages.length; ++i) {
                                        if (typeof object.partialMatchingImages[i] !== "object")
                                            throw TypeError(".google.cloud.vision.v1p4beta1.WebDetection.WebPage.partialMatchingImages: object expected");
                                        message.partialMatchingImages[i] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.fromObject(object.partialMatchingImages[i]);
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebPage message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.WebPage} message WebPage
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebPage.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.arrays || options.defaults) {
                                    object.fullMatchingImages = [];
                                    object.partialMatchingImages = [];
                                }
                                if (options.defaults) {
                                    object.url = "";
                                    object.score = 0;
                                    object.pageTitle = "";
                                }
                                if (message.url != null && message.hasOwnProperty("url"))
                                    object.url = message.url;
                                if (message.score != null && message.hasOwnProperty("score"))
                                    object.score = options.json && !isFinite(message.score) ? String(message.score) : message.score;
                                if (message.pageTitle != null && message.hasOwnProperty("pageTitle"))
                                    object.pageTitle = message.pageTitle;
                                if (message.fullMatchingImages && message.fullMatchingImages.length) {
                                    object.fullMatchingImages = [];
                                    for (var j = 0; j < message.fullMatchingImages.length; ++j)
                                        object.fullMatchingImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.toObject(message.fullMatchingImages[j], options);
                                }
                                if (message.partialMatchingImages && message.partialMatchingImages.length) {
                                    object.partialMatchingImages = [];
                                    for (var j = 0; j < message.partialMatchingImages.length; ++j)
                                        object.partialMatchingImages[j] = $root.google.cloud.vision.v1p4beta1.WebDetection.WebImage.toObject(message.partialMatchingImages[j], options);
                                }
                                return object;
                            };
    
                            /**
                             * Converts this WebPage to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebPage.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebPage
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebPage
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebPage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetection.WebPage";
                            };
    
                            return WebPage;
                        })();
    
                        WebDetection.WebLabel = (function() {
    
                            /**
                             * Properties of a WebLabel.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @interface IWebLabel
                             * @property {string|null} [label] WebLabel label
                             * @property {string|null} [languageCode] WebLabel languageCode
                             */
    
                            /**
                             * Constructs a new WebLabel.
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection
                             * @classdesc Represents a WebLabel.
                             * @implements IWebLabel
                             * @constructor
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             */
                            function WebLabel(properties) {
                                if (properties)
                                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                        if (properties[keys[i]] != null)
                                            this[keys[i]] = properties[keys[i]];
                            }
    
                            /**
                             * WebLabel label.
                             * @member {string} label
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.label = "";
    
                            /**
                             * WebLabel languageCode.
                             * @member {string} languageCode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @instance
                             */
                            WebLabel.prototype.languageCode = "";
    
                            /**
                             * Creates a new WebLabel instance using the specified properties.
                             * @function create
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebLabel=} [properties] Properties to set
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebLabel} WebLabel instance
                             */
                            WebLabel.create = function create(properties) {
                                return new WebLabel(properties);
                            };
    
                            /**
                             * Encodes the specified WebLabel message. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encode = function encode(message, writer) {
                                if (!writer)
                                    writer = $Writer.create();
                                if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                                    writer.uint32(/* id 1, wireType 2 =*/10).string(message.label);
                                if (message.languageCode != null && Object.hasOwnProperty.call(message, "languageCode"))
                                    writer.uint32(/* id 2, wireType 2 =*/18).string(message.languageCode);
                                return writer;
                            };
    
                            /**
                             * Encodes the specified WebLabel message, length delimited. Does not implicitly {@link google.cloud.vision.v1p4beta1.WebDetection.WebLabel.verify|verify} messages.
                             * @function encodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.IWebLabel} message WebLabel message or plain object to encode
                             * @param {$protobuf.Writer} [writer] Writer to encode to
                             * @returns {$protobuf.Writer} Writer
                             */
                            WebLabel.encodeDelimited = function encodeDelimited(message, writer) {
                                return this.encode(message, writer).ldelim();
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer.
                             * @function decode
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @param {number} [length] Message length if known beforehand
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decode = function decode(reader, length) {
                                if (!(reader instanceof $Reader))
                                    reader = $Reader.create(reader);
                                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel();
                                while (reader.pos < end) {
                                    var tag = reader.uint32();
                                    switch (tag >>> 3) {
                                    case 1: {
                                            message.label = reader.string();
                                            break;
                                        }
                                    case 2: {
                                            message.languageCode = reader.string();
                                            break;
                                        }
                                    default:
                                        reader.skipType(tag & 7);
                                        break;
                                    }
                                }
                                return message;
                            };
    
                            /**
                             * Decodes a WebLabel message from the specified reader or buffer, length delimited.
                             * @function decodeDelimited
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebLabel} WebLabel
                             * @throws {Error} If the payload is not a reader or valid buffer
                             * @throws {$protobuf.util.ProtocolError} If required fields are missing
                             */
                            WebLabel.decodeDelimited = function decodeDelimited(reader) {
                                if (!(reader instanceof $Reader))
                                    reader = new $Reader(reader);
                                return this.decode(reader, reader.uint32());
                            };
    
                            /**
                             * Verifies a WebLabel message.
                             * @function verify
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} message Plain object to verify
                             * @returns {string|null} `null` if valid, otherwise the reason why it is not
                             */
                            WebLabel.verify = function verify(message) {
                                if (typeof message !== "object" || message === null)
                                    return "object expected";
                                if (message.label != null && message.hasOwnProperty("label"))
                                    if (!$util.isString(message.label))
                                        return "label: string expected";
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    if (!$util.isString(message.languageCode))
                                        return "languageCode: string expected";
                                return null;
                            };
    
                            /**
                             * Creates a WebLabel message from a plain object. Also converts values to their respective internal types.
                             * @function fromObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {Object.<string,*>} object Plain object
                             * @returns {google.cloud.vision.v1p4beta1.WebDetection.WebLabel} WebLabel
                             */
                            WebLabel.fromObject = function fromObject(object) {
                                if (object instanceof $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)
                                    return object;
                                var message = new $root.google.cloud.vision.v1p4beta1.WebDetection.WebLabel();
                                if (object.label != null)
                                    message.label = String(object.label);
                                if (object.languageCode != null)
                                    message.languageCode = String(object.languageCode);
                                return message;
                            };
    
                            /**
                             * Creates a plain object from a WebLabel message. Also converts values to other types if specified.
                             * @function toObject
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {google.cloud.vision.v1p4beta1.WebDetection.WebLabel} message WebLabel
                             * @param {$protobuf.IConversionOptions} [options] Conversion options
                             * @returns {Object.<string,*>} Plain object
                             */
                            WebLabel.toObject = function toObject(message, options) {
                                if (!options)
                                    options = {};
                                var object = {};
                                if (options.defaults) {
                                    object.label = "";
                                    object.languageCode = "";
                                }
                                if (message.label != null && message.hasOwnProperty("label"))
                                    object.label = message.label;
                                if (message.languageCode != null && message.hasOwnProperty("languageCode"))
                                    object.languageCode = message.languageCode;
                                return object;
                            };
    
                            /**
                             * Converts this WebLabel to JSON.
                             * @function toJSON
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @instance
                             * @returns {Object.<string,*>} JSON object
                             */
                            WebLabel.prototype.toJSON = function toJSON() {
                                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                            };
    
                            /**
                             * Gets the default type url for WebLabel
                             * @function getTypeUrl
                             * @memberof google.cloud.vision.v1p4beta1.WebDetection.WebLabel
                             * @static
                             * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                             * @returns {string} The default type url
                             */
                            WebLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                                if (typeUrlPrefix === undefined) {
                                    typeUrlPrefix = "type.googleapis.com";
                                }
                                return typeUrlPrefix + "/google.cloud.vision.v1p4beta1.WebDetection.WebLabel";
                            };
    
                            return WebLabel;
                        })();
    
                        return WebDetection;
                    })();
    
                    return v1p4beta1;
                })();
    
                return vision;
            })();
    
            return cloud;
        })();
    
        google.api = (function() {
    
            /**
             * Namespace api.
             * @memberof google
             * @namespace
             */
            var api = {};
    
            api.Http = (function() {
    
                /**
                 * Properties of a Http.
                 * @memberof google.api
                 * @interface IHttp
                 * @property {Array.<google.api.IHttpRule>|null} [rules] Http rules
                 * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion
                 */
    
                /**
                 * Constructs a new Http.
                 * @memberof google.api
                 * @classdesc Represents a Http.
                 * @implements IHttp
                 * @constructor
                 * @param {google.api.IHttp=} [properties] Properties to set
                 */
                function Http(properties) {
                    this.rules = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Http rules.
                 * @member {Array.<google.api.IHttpRule>} rules
                 * @memberof google.api.Http
                 * @instance
                 */
                Http.prototype.rules = $util.emptyArray;
    
                /**
                 * Http fullyDecodeReservedExpansion.
                 * @member {boolean} fullyDecodeReservedExpansion
                 * @memberof google.api.Http
                 * @instance
                 */
                Http.prototype.fullyDecodeReservedExpansion = false;
    
                /**
                 * Creates a new Http instance using the specified properties.
                 * @function create
                 * @memberof google.api.Http
                 * @static
                 * @param {google.api.IHttp=} [properties] Properties to set
                 * @returns {google.api.Http} Http instance
                 */
                Http.create = function create(properties) {
                    return new Http(properties);
                };
    
                /**
                 * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.Http
                 * @static
                 * @param {google.api.IHttp} message Http message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Http.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.rules != null && message.rules.length)
                        for (var i = 0; i < message.rules.length; ++i)
                            $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion);
                    return writer;
                };
    
                /**
                 * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.Http
                 * @static
                 * @param {google.api.IHttp} message Http message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Http.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Http message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.Http
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.Http} Http
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Http.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.rules && message.rules.length))
                                    message.rules = [];
                                message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                message.fullyDecodeReservedExpansion = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Http message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.Http
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.Http} Http
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Http.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Http message.
                 * @function verify
                 * @memberof google.api.Http
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Http.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.rules != null && message.hasOwnProperty("rules")) {
                        if (!Array.isArray(message.rules))
                            return "rules: array expected";
                        for (var i = 0; i < message.rules.length; ++i) {
                            var error = $root.google.api.HttpRule.verify(message.rules[i]);
                            if (error)
                                return "rules." + error;
                        }
                    }
                    if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
                        if (typeof message.fullyDecodeReservedExpansion !== "boolean")
                            return "fullyDecodeReservedExpansion: boolean expected";
                    return null;
                };
    
                /**
                 * Creates a Http message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.Http
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.Http} Http
                 */
                Http.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.Http)
                        return object;
                    var message = new $root.google.api.Http();
                    if (object.rules) {
                        if (!Array.isArray(object.rules))
                            throw TypeError(".google.api.Http.rules: array expected");
                        message.rules = [];
                        for (var i = 0; i < object.rules.length; ++i) {
                            if (typeof object.rules[i] !== "object")
                                throw TypeError(".google.api.Http.rules: object expected");
                            message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]);
                        }
                    }
                    if (object.fullyDecodeReservedExpansion != null)
                        message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion);
                    return message;
                };
    
                /**
                 * Creates a plain object from a Http message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.Http
                 * @static
                 * @param {google.api.Http} message Http
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Http.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.rules = [];
                    if (options.defaults)
                        object.fullyDecodeReservedExpansion = false;
                    if (message.rules && message.rules.length) {
                        object.rules = [];
                        for (var j = 0; j < message.rules.length; ++j)
                            object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options);
                    }
                    if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion"))
                        object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion;
                    return object;
                };
    
                /**
                 * Converts this Http to JSON.
                 * @function toJSON
                 * @memberof google.api.Http
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Http.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Http
                 * @function getTypeUrl
                 * @memberof google.api.Http
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.Http";
                };
    
                return Http;
            })();
    
            api.HttpRule = (function() {
    
                /**
                 * Properties of a HttpRule.
                 * @memberof google.api
                 * @interface IHttpRule
                 * @property {string|null} [selector] HttpRule selector
                 * @property {string|null} [get] HttpRule get
                 * @property {string|null} [put] HttpRule put
                 * @property {string|null} [post] HttpRule post
                 * @property {string|null} ["delete"] HttpRule delete
                 * @property {string|null} [patch] HttpRule patch
                 * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom
                 * @property {string|null} [body] HttpRule body
                 * @property {string|null} [responseBody] HttpRule responseBody
                 * @property {Array.<google.api.IHttpRule>|null} [additionalBindings] HttpRule additionalBindings
                 */
    
                /**
                 * Constructs a new HttpRule.
                 * @memberof google.api
                 * @classdesc Represents a HttpRule.
                 * @implements IHttpRule
                 * @constructor
                 * @param {google.api.IHttpRule=} [properties] Properties to set
                 */
                function HttpRule(properties) {
                    this.additionalBindings = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * HttpRule selector.
                 * @member {string} selector
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.selector = "";
    
                /**
                 * HttpRule get.
                 * @member {string|null|undefined} get
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.get = null;
    
                /**
                 * HttpRule put.
                 * @member {string|null|undefined} put
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.put = null;
    
                /**
                 * HttpRule post.
                 * @member {string|null|undefined} post
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.post = null;
    
                /**
                 * HttpRule delete.
                 * @member {string|null|undefined} delete
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype["delete"] = null;
    
                /**
                 * HttpRule patch.
                 * @member {string|null|undefined} patch
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.patch = null;
    
                /**
                 * HttpRule custom.
                 * @member {google.api.ICustomHttpPattern|null|undefined} custom
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.custom = null;
    
                /**
                 * HttpRule body.
                 * @member {string} body
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.body = "";
    
                /**
                 * HttpRule responseBody.
                 * @member {string} responseBody
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.responseBody = "";
    
                /**
                 * HttpRule additionalBindings.
                 * @member {Array.<google.api.IHttpRule>} additionalBindings
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                HttpRule.prototype.additionalBindings = $util.emptyArray;
    
                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;
    
                /**
                 * HttpRule pattern.
                 * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern
                 * @memberof google.api.HttpRule
                 * @instance
                 */
                Object.defineProperty(HttpRule.prototype, "pattern", {
                    get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]),
                    set: $util.oneOfSetter($oneOfFields)
                });
    
                /**
                 * Creates a new HttpRule instance using the specified properties.
                 * @function create
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {google.api.IHttpRule=} [properties] Properties to set
                 * @returns {google.api.HttpRule} HttpRule instance
                 */
                HttpRule.create = function create(properties) {
                    return new HttpRule(properties);
                };
    
                /**
                 * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HttpRule.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
                    if (message.get != null && Object.hasOwnProperty.call(message, "get"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.get);
                    if (message.put != null && Object.hasOwnProperty.call(message, "put"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.put);
                    if (message.post != null && Object.hasOwnProperty.call(message, "post"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.post);
                    if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete"))
                        writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]);
                    if (message.patch != null && Object.hasOwnProperty.call(message, "patch"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch);
                    if (message.body != null && Object.hasOwnProperty.call(message, "body"))
                        writer.uint32(/* id 7, wireType 2 =*/58).string(message.body);
                    if (message.custom != null && Object.hasOwnProperty.call(message, "custom"))
                        $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.additionalBindings != null && message.additionalBindings.length)
                        for (var i = 0; i < message.additionalBindings.length; ++i)
                            $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim();
                    if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody"))
                        writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody);
                    return writer;
                };
    
                /**
                 * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {google.api.IHttpRule} message HttpRule message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                HttpRule.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a HttpRule message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.HttpRule} HttpRule
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HttpRule.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.selector = reader.string();
                                break;
                            }
                        case 2: {
                                message.get = reader.string();
                                break;
                            }
                        case 3: {
                                message.put = reader.string();
                                break;
                            }
                        case 4: {
                                message.post = reader.string();
                                break;
                            }
                        case 5: {
                                message["delete"] = reader.string();
                                break;
                            }
                        case 6: {
                                message.patch = reader.string();
                                break;
                            }
                        case 8: {
                                message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32());
                                break;
                            }
                        case 7: {
                                message.body = reader.string();
                                break;
                            }
                        case 12: {
                                message.responseBody = reader.string();
                                break;
                            }
                        case 11: {
                                if (!(message.additionalBindings && message.additionalBindings.length))
                                    message.additionalBindings = [];
                                message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a HttpRule message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.HttpRule} HttpRule
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                HttpRule.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a HttpRule message.
                 * @function verify
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                HttpRule.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.selector != null && message.hasOwnProperty("selector"))
                        if (!$util.isString(message.selector))
                            return "selector: string expected";
                    if (message.get != null && message.hasOwnProperty("get")) {
                        properties.pattern = 1;
                        if (!$util.isString(message.get))
                            return "get: string expected";
                    }
                    if (message.put != null && message.hasOwnProperty("put")) {
                        if (properties.pattern === 1)
                            return "pattern: multiple values";
                        properties.pattern = 1;
                        if (!$util.isString(message.put))
                            return "put: string expected";
                    }
                    if (message.post != null && message.hasOwnProperty("post")) {
                        if (properties.pattern === 1)
                            return "pattern: multiple values";
                        properties.pattern = 1;
                        if (!$util.isString(message.post))
                            return "post: string expected";
                    }
                    if (message["delete"] != null && message.hasOwnProperty("delete")) {
                        if (properties.pattern === 1)
                            return "pattern: multiple values";
                        properties.pattern = 1;
                        if (!$util.isString(message["delete"]))
                            return "delete: string expected";
                    }
                    if (message.patch != null && message.hasOwnProperty("patch")) {
                        if (properties.pattern === 1)
                            return "pattern: multiple values";
                        properties.pattern = 1;
                        if (!$util.isString(message.patch))
                            return "patch: string expected";
                    }
                    if (message.custom != null && message.hasOwnProperty("custom")) {
                        if (properties.pattern === 1)
                            return "pattern: multiple values";
                        properties.pattern = 1;
                        {
                            var error = $root.google.api.CustomHttpPattern.verify(message.custom);
                            if (error)
                                return "custom." + error;
                        }
                    }
                    if (message.body != null && message.hasOwnProperty("body"))
                        if (!$util.isString(message.body))
                            return "body: string expected";
                    if (message.responseBody != null && message.hasOwnProperty("responseBody"))
                        if (!$util.isString(message.responseBody))
                            return "responseBody: string expected";
                    if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) {
                        if (!Array.isArray(message.additionalBindings))
                            return "additionalBindings: array expected";
                        for (var i = 0; i < message.additionalBindings.length; ++i) {
                            var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]);
                            if (error)
                                return "additionalBindings." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a HttpRule message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.HttpRule} HttpRule
                 */
                HttpRule.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.HttpRule)
                        return object;
                    var message = new $root.google.api.HttpRule();
                    if (object.selector != null)
                        message.selector = String(object.selector);
                    if (object.get != null)
                        message.get = String(object.get);
                    if (object.put != null)
                        message.put = String(object.put);
                    if (object.post != null)
                        message.post = String(object.post);
                    if (object["delete"] != null)
                        message["delete"] = String(object["delete"]);
                    if (object.patch != null)
                        message.patch = String(object.patch);
                    if (object.custom != null) {
                        if (typeof object.custom !== "object")
                            throw TypeError(".google.api.HttpRule.custom: object expected");
                        message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom);
                    }
                    if (object.body != null)
                        message.body = String(object.body);
                    if (object.responseBody != null)
                        message.responseBody = String(object.responseBody);
                    if (object.additionalBindings) {
                        if (!Array.isArray(object.additionalBindings))
                            throw TypeError(".google.api.HttpRule.additionalBindings: array expected");
                        message.additionalBindings = [];
                        for (var i = 0; i < object.additionalBindings.length; ++i) {
                            if (typeof object.additionalBindings[i] !== "object")
                                throw TypeError(".google.api.HttpRule.additionalBindings: object expected");
                            message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a HttpRule message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {google.api.HttpRule} message HttpRule
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                HttpRule.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.additionalBindings = [];
                    if (options.defaults) {
                        object.selector = "";
                        object.body = "";
                        object.responseBody = "";
                    }
                    if (message.selector != null && message.hasOwnProperty("selector"))
                        object.selector = message.selector;
                    if (message.get != null && message.hasOwnProperty("get")) {
                        object.get = message.get;
                        if (options.oneofs)
                            object.pattern = "get";
                    }
                    if (message.put != null && message.hasOwnProperty("put")) {
                        object.put = message.put;
                        if (options.oneofs)
                            object.pattern = "put";
                    }
                    if (message.post != null && message.hasOwnProperty("post")) {
                        object.post = message.post;
                        if (options.oneofs)
                            object.pattern = "post";
                    }
                    if (message["delete"] != null && message.hasOwnProperty("delete")) {
                        object["delete"] = message["delete"];
                        if (options.oneofs)
                            object.pattern = "delete";
                    }
                    if (message.patch != null && message.hasOwnProperty("patch")) {
                        object.patch = message.patch;
                        if (options.oneofs)
                            object.pattern = "patch";
                    }
                    if (message.body != null && message.hasOwnProperty("body"))
                        object.body = message.body;
                    if (message.custom != null && message.hasOwnProperty("custom")) {
                        object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options);
                        if (options.oneofs)
                            object.pattern = "custom";
                    }
                    if (message.additionalBindings && message.additionalBindings.length) {
                        object.additionalBindings = [];
                        for (var j = 0; j < message.additionalBindings.length; ++j)
                            object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options);
                    }
                    if (message.responseBody != null && message.hasOwnProperty("responseBody"))
                        object.responseBody = message.responseBody;
                    return object;
                };
    
                /**
                 * Converts this HttpRule to JSON.
                 * @function toJSON
                 * @memberof google.api.HttpRule
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                HttpRule.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for HttpRule
                 * @function getTypeUrl
                 * @memberof google.api.HttpRule
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.HttpRule";
                };
    
                return HttpRule;
            })();
    
            api.CustomHttpPattern = (function() {
    
                /**
                 * Properties of a CustomHttpPattern.
                 * @memberof google.api
                 * @interface ICustomHttpPattern
                 * @property {string|null} [kind] CustomHttpPattern kind
                 * @property {string|null} [path] CustomHttpPattern path
                 */
    
                /**
                 * Constructs a new CustomHttpPattern.
                 * @memberof google.api
                 * @classdesc Represents a CustomHttpPattern.
                 * @implements ICustomHttpPattern
                 * @constructor
                 * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
                 */
                function CustomHttpPattern(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * CustomHttpPattern kind.
                 * @member {string} kind
                 * @memberof google.api.CustomHttpPattern
                 * @instance
                 */
                CustomHttpPattern.prototype.kind = "";
    
                /**
                 * CustomHttpPattern path.
                 * @member {string} path
                 * @memberof google.api.CustomHttpPattern
                 * @instance
                 */
                CustomHttpPattern.prototype.path = "";
    
                /**
                 * Creates a new CustomHttpPattern instance using the specified properties.
                 * @function create
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {google.api.ICustomHttpPattern=} [properties] Properties to set
                 * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance
                 */
                CustomHttpPattern.create = function create(properties) {
                    return new CustomHttpPattern(properties);
                };
    
                /**
                 * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CustomHttpPattern.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.kind != null && Object.hasOwnProperty.call(message, "kind"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind);
                    if (message.path != null && Object.hasOwnProperty.call(message, "path"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.path);
                    return writer;
                };
    
                /**
                 * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a CustomHttpPattern message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.CustomHttpPattern} CustomHttpPattern
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CustomHttpPattern.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.kind = reader.string();
                                break;
                            }
                        case 2: {
                                message.path = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.CustomHttpPattern} CustomHttpPattern
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a CustomHttpPattern message.
                 * @function verify
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CustomHttpPattern.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.kind != null && message.hasOwnProperty("kind"))
                        if (!$util.isString(message.kind))
                            return "kind: string expected";
                    if (message.path != null && message.hasOwnProperty("path"))
                        if (!$util.isString(message.path))
                            return "path: string expected";
                    return null;
                };
    
                /**
                 * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.CustomHttpPattern} CustomHttpPattern
                 */
                CustomHttpPattern.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.CustomHttpPattern)
                        return object;
                    var message = new $root.google.api.CustomHttpPattern();
                    if (object.kind != null)
                        message.kind = String(object.kind);
                    if (object.path != null)
                        message.path = String(object.path);
                    return message;
                };
    
                /**
                 * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {google.api.CustomHttpPattern} message CustomHttpPattern
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CustomHttpPattern.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.kind = "";
                        object.path = "";
                    }
                    if (message.kind != null && message.hasOwnProperty("kind"))
                        object.kind = message.kind;
                    if (message.path != null && message.hasOwnProperty("path"))
                        object.path = message.path;
                    return object;
                };
    
                /**
                 * Converts this CustomHttpPattern to JSON.
                 * @function toJSON
                 * @memberof google.api.CustomHttpPattern
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CustomHttpPattern.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for CustomHttpPattern
                 * @function getTypeUrl
                 * @memberof google.api.CustomHttpPattern
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.CustomHttpPattern";
                };
    
                return CustomHttpPattern;
            })();
    
            api.CommonLanguageSettings = (function() {
    
                /**
                 * Properties of a CommonLanguageSettings.
                 * @memberof google.api
                 * @interface ICommonLanguageSettings
                 * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri
                 * @property {Array.<google.api.ClientLibraryDestination>|null} [destinations] CommonLanguageSettings destinations
                 */
    
                /**
                 * Constructs a new CommonLanguageSettings.
                 * @memberof google.api
                 * @classdesc Represents a CommonLanguageSettings.
                 * @implements ICommonLanguageSettings
                 * @constructor
                 * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
                 */
                function CommonLanguageSettings(properties) {
                    this.destinations = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * CommonLanguageSettings referenceDocsUri.
                 * @member {string} referenceDocsUri
                 * @memberof google.api.CommonLanguageSettings
                 * @instance
                 */
                CommonLanguageSettings.prototype.referenceDocsUri = "";
    
                /**
                 * CommonLanguageSettings destinations.
                 * @member {Array.<google.api.ClientLibraryDestination>} destinations
                 * @memberof google.api.CommonLanguageSettings
                 * @instance
                 */
                CommonLanguageSettings.prototype.destinations = $util.emptyArray;
    
                /**
                 * Creates a new CommonLanguageSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set
                 * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance
                 */
                CommonLanguageSettings.create = function create(properties) {
                    return new CommonLanguageSettings(properties);
                };
    
                /**
                 * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CommonLanguageSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri);
                    if (message.destinations != null && message.destinations.length) {
                        writer.uint32(/* id 2, wireType 2 =*/18).fork();
                        for (var i = 0; i < message.destinations.length; ++i)
                            writer.int32(message.destinations[i]);
                        writer.ldelim();
                    }
                    return writer;
                };
    
                /**
                 * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a CommonLanguageSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CommonLanguageSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.referenceDocsUri = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.destinations && message.destinations.length))
                                    message.destinations = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message.destinations.push(reader.int32());
                                } else
                                    message.destinations.push(reader.int32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a CommonLanguageSettings message.
                 * @function verify
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CommonLanguageSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri"))
                        if (!$util.isString(message.referenceDocsUri))
                            return "referenceDocsUri: string expected";
                    if (message.destinations != null && message.hasOwnProperty("destinations")) {
                        if (!Array.isArray(message.destinations))
                            return "destinations: array expected";
                        for (var i = 0; i < message.destinations.length; ++i)
                            switch (message.destinations[i]) {
                            default:
                                return "destinations: enum value[] expected";
                            case 0:
                            case 10:
                            case 20:
                                break;
                            }
                    }
                    return null;
                };
    
                /**
                 * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings
                 */
                CommonLanguageSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.CommonLanguageSettings)
                        return object;
                    var message = new $root.google.api.CommonLanguageSettings();
                    if (object.referenceDocsUri != null)
                        message.referenceDocsUri = String(object.referenceDocsUri);
                    if (object.destinations) {
                        if (!Array.isArray(object.destinations))
                            throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");
                        message.destinations = [];
                        for (var i = 0; i < object.destinations.length; ++i)
                            switch (object.destinations[i]) {
                            default:
                                if (typeof object.destinations[i] === "number") {
                                    message.destinations[i] = object.destinations[i];
                                    break;
                                }
                            case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED":
                            case 0:
                                message.destinations[i] = 0;
                                break;
                            case "GITHUB":
                            case 10:
                                message.destinations[i] = 10;
                                break;
                            case "PACKAGE_MANAGER":
                            case 20:
                                message.destinations[i] = 20;
                                break;
                            }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CommonLanguageSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.destinations = [];
                    if (options.defaults)
                        object.referenceDocsUri = "";
                    if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri"))
                        object.referenceDocsUri = message.referenceDocsUri;
                    if (message.destinations && message.destinations.length) {
                        object.destinations = [];
                        for (var j = 0; j < message.destinations.length; ++j)
                            object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this CommonLanguageSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.CommonLanguageSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CommonLanguageSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for CommonLanguageSettings
                 * @function getTypeUrl
                 * @memberof google.api.CommonLanguageSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.CommonLanguageSettings";
                };
    
                return CommonLanguageSettings;
            })();
    
            api.ClientLibrarySettings = (function() {
    
                /**
                 * Properties of a ClientLibrarySettings.
                 * @memberof google.api
                 * @interface IClientLibrarySettings
                 * @property {string|null} [version] ClientLibrarySettings version
                 * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage
                 * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums
                 * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings
                 * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings
                 * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings
                 * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings
                 * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings
                 * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings
                 * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings
                 * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings
                 */
    
                /**
                 * Constructs a new ClientLibrarySettings.
                 * @memberof google.api
                 * @classdesc Represents a ClientLibrarySettings.
                 * @implements IClientLibrarySettings
                 * @constructor
                 * @param {google.api.IClientLibrarySettings=} [properties] Properties to set
                 */
                function ClientLibrarySettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ClientLibrarySettings version.
                 * @member {string} version
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.version = "";
    
                /**
                 * ClientLibrarySettings launchStage.
                 * @member {google.api.LaunchStage} launchStage
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.launchStage = 0;
    
                /**
                 * ClientLibrarySettings restNumericEnums.
                 * @member {boolean} restNumericEnums
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.restNumericEnums = false;
    
                /**
                 * ClientLibrarySettings javaSettings.
                 * @member {google.api.IJavaSettings|null|undefined} javaSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.javaSettings = null;
    
                /**
                 * ClientLibrarySettings cppSettings.
                 * @member {google.api.ICppSettings|null|undefined} cppSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.cppSettings = null;
    
                /**
                 * ClientLibrarySettings phpSettings.
                 * @member {google.api.IPhpSettings|null|undefined} phpSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.phpSettings = null;
    
                /**
                 * ClientLibrarySettings pythonSettings.
                 * @member {google.api.IPythonSettings|null|undefined} pythonSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.pythonSettings = null;
    
                /**
                 * ClientLibrarySettings nodeSettings.
                 * @member {google.api.INodeSettings|null|undefined} nodeSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.nodeSettings = null;
    
                /**
                 * ClientLibrarySettings dotnetSettings.
                 * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.dotnetSettings = null;
    
                /**
                 * ClientLibrarySettings rubySettings.
                 * @member {google.api.IRubySettings|null|undefined} rubySettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.rubySettings = null;
    
                /**
                 * ClientLibrarySettings goSettings.
                 * @member {google.api.IGoSettings|null|undefined} goSettings
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 */
                ClientLibrarySettings.prototype.goSettings = null;
    
                /**
                 * Creates a new ClientLibrarySettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {google.api.IClientLibrarySettings=} [properties] Properties to set
                 * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance
                 */
                ClientLibrarySettings.create = function create(properties) {
                    return new ClientLibrarySettings(properties);
                };
    
                /**
                 * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ClientLibrarySettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.version != null && Object.hasOwnProperty.call(message, "version"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.version);
                    if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage);
                    if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums);
                    if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings"))
                        $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                    if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings"))
                        $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim();
                    if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings"))
                        $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim();
                    if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings"))
                        $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim();
                    if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings"))
                        $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim();
                    if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings"))
                        $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim();
                    if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings"))
                        $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim();
                    if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings"))
                        $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ClientLibrarySettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ClientLibrarySettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.version = reader.string();
                                break;
                            }
                        case 2: {
                                message.launchStage = reader.int32();
                                break;
                            }
                        case 3: {
                                message.restNumericEnums = reader.bool();
                                break;
                            }
                        case 21: {
                                message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 22: {
                                message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 23: {
                                message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 24: {
                                message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 25: {
                                message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 26: {
                                message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 27: {
                                message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 28: {
                                message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ClientLibrarySettings message.
                 * @function verify
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ClientLibrarySettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.version != null && message.hasOwnProperty("version"))
                        if (!$util.isString(message.version))
                            return "version: string expected";
                    if (message.launchStage != null && message.hasOwnProperty("launchStage"))
                        switch (message.launchStage) {
                        default:
                            return "launchStage: enum value expected";
                        case 0:
                        case 6:
                        case 7:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                            break;
                        }
                    if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums"))
                        if (typeof message.restNumericEnums !== "boolean")
                            return "restNumericEnums: boolean expected";
                    if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) {
                        var error = $root.google.api.JavaSettings.verify(message.javaSettings);
                        if (error)
                            return "javaSettings." + error;
                    }
                    if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) {
                        var error = $root.google.api.CppSettings.verify(message.cppSettings);
                        if (error)
                            return "cppSettings." + error;
                    }
                    if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) {
                        var error = $root.google.api.PhpSettings.verify(message.phpSettings);
                        if (error)
                            return "phpSettings." + error;
                    }
                    if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) {
                        var error = $root.google.api.PythonSettings.verify(message.pythonSettings);
                        if (error)
                            return "pythonSettings." + error;
                    }
                    if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) {
                        var error = $root.google.api.NodeSettings.verify(message.nodeSettings);
                        if (error)
                            return "nodeSettings." + error;
                    }
                    if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) {
                        var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings);
                        if (error)
                            return "dotnetSettings." + error;
                    }
                    if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) {
                        var error = $root.google.api.RubySettings.verify(message.rubySettings);
                        if (error)
                            return "rubySettings." + error;
                    }
                    if (message.goSettings != null && message.hasOwnProperty("goSettings")) {
                        var error = $root.google.api.GoSettings.verify(message.goSettings);
                        if (error)
                            return "goSettings." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings
                 */
                ClientLibrarySettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.ClientLibrarySettings)
                        return object;
                    var message = new $root.google.api.ClientLibrarySettings();
                    if (object.version != null)
                        message.version = String(object.version);
                    switch (object.launchStage) {
                    default:
                        if (typeof object.launchStage === "number") {
                            message.launchStage = object.launchStage;
                            break;
                        }
                        break;
                    case "LAUNCH_STAGE_UNSPECIFIED":
                    case 0:
                        message.launchStage = 0;
                        break;
                    case "UNIMPLEMENTED":
                    case 6:
                        message.launchStage = 6;
                        break;
                    case "PRELAUNCH":
                    case 7:
                        message.launchStage = 7;
                        break;
                    case "EARLY_ACCESS":
                    case 1:
                        message.launchStage = 1;
                        break;
                    case "ALPHA":
                    case 2:
                        message.launchStage = 2;
                        break;
                    case "BETA":
                    case 3:
                        message.launchStage = 3;
                        break;
                    case "GA":
                    case 4:
                        message.launchStage = 4;
                        break;
                    case "DEPRECATED":
                    case 5:
                        message.launchStage = 5;
                        break;
                    }
                    if (object.restNumericEnums != null)
                        message.restNumericEnums = Boolean(object.restNumericEnums);
                    if (object.javaSettings != null) {
                        if (typeof object.javaSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");
                        message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings);
                    }
                    if (object.cppSettings != null) {
                        if (typeof object.cppSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");
                        message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings);
                    }
                    if (object.phpSettings != null) {
                        if (typeof object.phpSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");
                        message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings);
                    }
                    if (object.pythonSettings != null) {
                        if (typeof object.pythonSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");
                        message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings);
                    }
                    if (object.nodeSettings != null) {
                        if (typeof object.nodeSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");
                        message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings);
                    }
                    if (object.dotnetSettings != null) {
                        if (typeof object.dotnetSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");
                        message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings);
                    }
                    if (object.rubySettings != null) {
                        if (typeof object.rubySettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");
                        message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings);
                    }
                    if (object.goSettings != null) {
                        if (typeof object.goSettings !== "object")
                            throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");
                        message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ClientLibrarySettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.version = "";
                        object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0;
                        object.restNumericEnums = false;
                        object.javaSettings = null;
                        object.cppSettings = null;
                        object.phpSettings = null;
                        object.pythonSettings = null;
                        object.nodeSettings = null;
                        object.dotnetSettings = null;
                        object.rubySettings = null;
                        object.goSettings = null;
                    }
                    if (message.version != null && message.hasOwnProperty("version"))
                        object.version = message.version;
                    if (message.launchStage != null && message.hasOwnProperty("launchStage"))
                        object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage;
                    if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums"))
                        object.restNumericEnums = message.restNumericEnums;
                    if (message.javaSettings != null && message.hasOwnProperty("javaSettings"))
                        object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options);
                    if (message.cppSettings != null && message.hasOwnProperty("cppSettings"))
                        object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options);
                    if (message.phpSettings != null && message.hasOwnProperty("phpSettings"))
                        object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options);
                    if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings"))
                        object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options);
                    if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings"))
                        object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options);
                    if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings"))
                        object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options);
                    if (message.rubySettings != null && message.hasOwnProperty("rubySettings"))
                        object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options);
                    if (message.goSettings != null && message.hasOwnProperty("goSettings"))
                        object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options);
                    return object;
                };
    
                /**
                 * Converts this ClientLibrarySettings to JSON.
                 * @function toJSON
                 * @memberof google.api.ClientLibrarySettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ClientLibrarySettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ClientLibrarySettings
                 * @function getTypeUrl
                 * @memberof google.api.ClientLibrarySettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.ClientLibrarySettings";
                };
    
                return ClientLibrarySettings;
            })();
    
            api.Publishing = (function() {
    
                /**
                 * Properties of a Publishing.
                 * @memberof google.api
                 * @interface IPublishing
                 * @property {Array.<google.api.IMethodSettings>|null} [methodSettings] Publishing methodSettings
                 * @property {string|null} [newIssueUri] Publishing newIssueUri
                 * @property {string|null} [documentationUri] Publishing documentationUri
                 * @property {string|null} [apiShortName] Publishing apiShortName
                 * @property {string|null} [githubLabel] Publishing githubLabel
                 * @property {Array.<string>|null} [codeownerGithubTeams] Publishing codeownerGithubTeams
                 * @property {string|null} [docTagPrefix] Publishing docTagPrefix
                 * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization
                 * @property {Array.<google.api.IClientLibrarySettings>|null} [librarySettings] Publishing librarySettings
                 * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri
                 */
    
                /**
                 * Constructs a new Publishing.
                 * @memberof google.api
                 * @classdesc Represents a Publishing.
                 * @implements IPublishing
                 * @constructor
                 * @param {google.api.IPublishing=} [properties] Properties to set
                 */
                function Publishing(properties) {
                    this.methodSettings = [];
                    this.codeownerGithubTeams = [];
                    this.librarySettings = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Publishing methodSettings.
                 * @member {Array.<google.api.IMethodSettings>} methodSettings
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.methodSettings = $util.emptyArray;
    
                /**
                 * Publishing newIssueUri.
                 * @member {string} newIssueUri
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.newIssueUri = "";
    
                /**
                 * Publishing documentationUri.
                 * @member {string} documentationUri
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.documentationUri = "";
    
                /**
                 * Publishing apiShortName.
                 * @member {string} apiShortName
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.apiShortName = "";
    
                /**
                 * Publishing githubLabel.
                 * @member {string} githubLabel
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.githubLabel = "";
    
                /**
                 * Publishing codeownerGithubTeams.
                 * @member {Array.<string>} codeownerGithubTeams
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.codeownerGithubTeams = $util.emptyArray;
    
                /**
                 * Publishing docTagPrefix.
                 * @member {string} docTagPrefix
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.docTagPrefix = "";
    
                /**
                 * Publishing organization.
                 * @member {google.api.ClientLibraryOrganization} organization
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.organization = 0;
    
                /**
                 * Publishing librarySettings.
                 * @member {Array.<google.api.IClientLibrarySettings>} librarySettings
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.librarySettings = $util.emptyArray;
    
                /**
                 * Publishing protoReferenceDocumentationUri.
                 * @member {string} protoReferenceDocumentationUri
                 * @memberof google.api.Publishing
                 * @instance
                 */
                Publishing.prototype.protoReferenceDocumentationUri = "";
    
                /**
                 * Creates a new Publishing instance using the specified properties.
                 * @function create
                 * @memberof google.api.Publishing
                 * @static
                 * @param {google.api.IPublishing=} [properties] Properties to set
                 * @returns {google.api.Publishing} Publishing instance
                 */
                Publishing.create = function create(properties) {
                    return new Publishing(properties);
                };
    
                /**
                 * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.Publishing
                 * @static
                 * @param {google.api.IPublishing} message Publishing message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Publishing.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.methodSettings != null && message.methodSettings.length)
                        for (var i = 0; i < message.methodSettings.length; ++i)
                            $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri"))
                        writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri);
                    if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri"))
                        writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri);
                    if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName"))
                        writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName);
                    if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel"))
                        writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel);
                    if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length)
                        for (var i = 0; i < message.codeownerGithubTeams.length; ++i)
                            writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]);
                    if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix"))
                        writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix);
                    if (message.organization != null && Object.hasOwnProperty.call(message, "organization"))
                        writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization);
                    if (message.librarySettings != null && message.librarySettings.length)
                        for (var i = 0; i < message.librarySettings.length; ++i)
                            $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim();
                    if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri"))
                        writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri);
                    return writer;
                };
    
                /**
                 * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.Publishing
                 * @static
                 * @param {google.api.IPublishing} message Publishing message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Publishing.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Publishing message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.Publishing
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.Publishing} Publishing
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Publishing.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 2: {
                                if (!(message.methodSettings && message.methodSettings.length))
                                    message.methodSettings = [];
                                message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32()));
                                break;
                            }
                        case 101: {
                                message.newIssueUri = reader.string();
                                break;
                            }
                        case 102: {
                                message.documentationUri = reader.string();
                                break;
                            }
                        case 103: {
                                message.apiShortName = reader.string();
                                break;
                            }
                        case 104: {
                                message.githubLabel = reader.string();
                                break;
                            }
                        case 105: {
                                if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length))
                                    message.codeownerGithubTeams = [];
                                message.codeownerGithubTeams.push(reader.string());
                                break;
                            }
                        case 106: {
                                message.docTagPrefix = reader.string();
                                break;
                            }
                        case 107: {
                                message.organization = reader.int32();
                                break;
                            }
                        case 109: {
                                if (!(message.librarySettings && message.librarySettings.length))
                                    message.librarySettings = [];
                                message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32()));
                                break;
                            }
                        case 110: {
                                message.protoReferenceDocumentationUri = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Publishing message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.Publishing
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.Publishing} Publishing
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Publishing.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Publishing message.
                 * @function verify
                 * @memberof google.api.Publishing
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Publishing.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) {
                        if (!Array.isArray(message.methodSettings))
                            return "methodSettings: array expected";
                        for (var i = 0; i < message.methodSettings.length; ++i) {
                            var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]);
                            if (error)
                                return "methodSettings." + error;
                        }
                    }
                    if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri"))
                        if (!$util.isString(message.newIssueUri))
                            return "newIssueUri: string expected";
                    if (message.documentationUri != null && message.hasOwnProperty("documentationUri"))
                        if (!$util.isString(message.documentationUri))
                            return "documentationUri: string expected";
                    if (message.apiShortName != null && message.hasOwnProperty("apiShortName"))
                        if (!$util.isString(message.apiShortName))
                            return "apiShortName: string expected";
                    if (message.githubLabel != null && message.hasOwnProperty("githubLabel"))
                        if (!$util.isString(message.githubLabel))
                            return "githubLabel: string expected";
                    if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) {
                        if (!Array.isArray(message.codeownerGithubTeams))
                            return "codeownerGithubTeams: array expected";
                        for (var i = 0; i < message.codeownerGithubTeams.length; ++i)
                            if (!$util.isString(message.codeownerGithubTeams[i]))
                                return "codeownerGithubTeams: string[] expected";
                    }
                    if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix"))
                        if (!$util.isString(message.docTagPrefix))
                            return "docTagPrefix: string expected";
                    if (message.organization != null && message.hasOwnProperty("organization"))
                        switch (message.organization) {
                        default:
                            return "organization: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                            break;
                        }
                    if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) {
                        if (!Array.isArray(message.librarySettings))
                            return "librarySettings: array expected";
                        for (var i = 0; i < message.librarySettings.length; ++i) {
                            var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]);
                            if (error)
                                return "librarySettings." + error;
                        }
                    }
                    if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri"))
                        if (!$util.isString(message.protoReferenceDocumentationUri))
                            return "protoReferenceDocumentationUri: string expected";
                    return null;
                };
    
                /**
                 * Creates a Publishing message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.Publishing
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.Publishing} Publishing
                 */
                Publishing.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.Publishing)
                        return object;
                    var message = new $root.google.api.Publishing();
                    if (object.methodSettings) {
                        if (!Array.isArray(object.methodSettings))
                            throw TypeError(".google.api.Publishing.methodSettings: array expected");
                        message.methodSettings = [];
                        for (var i = 0; i < object.methodSettings.length; ++i) {
                            if (typeof object.methodSettings[i] !== "object")
                                throw TypeError(".google.api.Publishing.methodSettings: object expected");
                            message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]);
                        }
                    }
                    if (object.newIssueUri != null)
                        message.newIssueUri = String(object.newIssueUri);
                    if (object.documentationUri != null)
                        message.documentationUri = String(object.documentationUri);
                    if (object.apiShortName != null)
                        message.apiShortName = String(object.apiShortName);
                    if (object.githubLabel != null)
                        message.githubLabel = String(object.githubLabel);
                    if (object.codeownerGithubTeams) {
                        if (!Array.isArray(object.codeownerGithubTeams))
                            throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected");
                        message.codeownerGithubTeams = [];
                        for (var i = 0; i < object.codeownerGithubTeams.length; ++i)
                            message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]);
                    }
                    if (object.docTagPrefix != null)
                        message.docTagPrefix = String(object.docTagPrefix);
                    switch (object.organization) {
                    default:
                        if (typeof object.organization === "number") {
                            message.organization = object.organization;
                            break;
                        }
                        break;
                    case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":
                    case 0:
                        message.organization = 0;
                        break;
                    case "CLOUD":
                    case 1:
                        message.organization = 1;
                        break;
                    case "ADS":
                    case 2:
                        message.organization = 2;
                        break;
                    case "PHOTOS":
                    case 3:
                        message.organization = 3;
                        break;
                    case "STREET_VIEW":
                    case 4:
                        message.organization = 4;
                        break;
                    case "SHOPPING":
                    case 5:
                        message.organization = 5;
                        break;
                    case "GEO":
                    case 6:
                        message.organization = 6;
                        break;
                    case "GENERATIVE_AI":
                    case 7:
                        message.organization = 7;
                        break;
                    }
                    if (object.librarySettings) {
                        if (!Array.isArray(object.librarySettings))
                            throw TypeError(".google.api.Publishing.librarySettings: array expected");
                        message.librarySettings = [];
                        for (var i = 0; i < object.librarySettings.length; ++i) {
                            if (typeof object.librarySettings[i] !== "object")
                                throw TypeError(".google.api.Publishing.librarySettings: object expected");
                            message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]);
                        }
                    }
                    if (object.protoReferenceDocumentationUri != null)
                        message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri);
                    return message;
                };
    
                /**
                 * Creates a plain object from a Publishing message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.Publishing
                 * @static
                 * @param {google.api.Publishing} message Publishing
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Publishing.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.methodSettings = [];
                        object.codeownerGithubTeams = [];
                        object.librarySettings = [];
                    }
                    if (options.defaults) {
                        object.newIssueUri = "";
                        object.documentationUri = "";
                        object.apiShortName = "";
                        object.githubLabel = "";
                        object.docTagPrefix = "";
                        object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0;
                        object.protoReferenceDocumentationUri = "";
                    }
                    if (message.methodSettings && message.methodSettings.length) {
                        object.methodSettings = [];
                        for (var j = 0; j < message.methodSettings.length; ++j)
                            object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options);
                    }
                    if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri"))
                        object.newIssueUri = message.newIssueUri;
                    if (message.documentationUri != null && message.hasOwnProperty("documentationUri"))
                        object.documentationUri = message.documentationUri;
                    if (message.apiShortName != null && message.hasOwnProperty("apiShortName"))
                        object.apiShortName = message.apiShortName;
                    if (message.githubLabel != null && message.hasOwnProperty("githubLabel"))
                        object.githubLabel = message.githubLabel;
                    if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) {
                        object.codeownerGithubTeams = [];
                        for (var j = 0; j < message.codeownerGithubTeams.length; ++j)
                            object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j];
                    }
                    if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix"))
                        object.docTagPrefix = message.docTagPrefix;
                    if (message.organization != null && message.hasOwnProperty("organization"))
                        object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization;
                    if (message.librarySettings && message.librarySettings.length) {
                        object.librarySettings = [];
                        for (var j = 0; j < message.librarySettings.length; ++j)
                            object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options);
                    }
                    if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri"))
                        object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri;
                    return object;
                };
    
                /**
                 * Converts this Publishing to JSON.
                 * @function toJSON
                 * @memberof google.api.Publishing
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Publishing.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Publishing
                 * @function getTypeUrl
                 * @memberof google.api.Publishing
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.Publishing";
                };
    
                return Publishing;
            })();
    
            api.JavaSettings = (function() {
    
                /**
                 * Properties of a JavaSettings.
                 * @memberof google.api
                 * @interface IJavaSettings
                 * @property {string|null} [libraryPackage] JavaSettings libraryPackage
                 * @property {Object.<string,string>|null} [serviceClassNames] JavaSettings serviceClassNames
                 * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common
                 */
    
                /**
                 * Constructs a new JavaSettings.
                 * @memberof google.api
                 * @classdesc Represents a JavaSettings.
                 * @implements IJavaSettings
                 * @constructor
                 * @param {google.api.IJavaSettings=} [properties] Properties to set
                 */
                function JavaSettings(properties) {
                    this.serviceClassNames = {};
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * JavaSettings libraryPackage.
                 * @member {string} libraryPackage
                 * @memberof google.api.JavaSettings
                 * @instance
                 */
                JavaSettings.prototype.libraryPackage = "";
    
                /**
                 * JavaSettings serviceClassNames.
                 * @member {Object.<string,string>} serviceClassNames
                 * @memberof google.api.JavaSettings
                 * @instance
                 */
                JavaSettings.prototype.serviceClassNames = $util.emptyObject;
    
                /**
                 * JavaSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.JavaSettings
                 * @instance
                 */
                JavaSettings.prototype.common = null;
    
                /**
                 * Creates a new JavaSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {google.api.IJavaSettings=} [properties] Properties to set
                 * @returns {google.api.JavaSettings} JavaSettings instance
                 */
                JavaSettings.create = function create(properties) {
                    return new JavaSettings(properties);
                };
    
                /**
                 * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                JavaSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage);
                    if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames"))
                        for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i)
                            writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                JavaSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a JavaSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.JavaSettings} JavaSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                JavaSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value;
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.libraryPackage = reader.string();
                                break;
                            }
                        case 2: {
                                if (message.serviceClassNames === $util.emptyObject)
                                    message.serviceClassNames = {};
                                var end2 = reader.uint32() + reader.pos;
                                key = "";
                                value = "";
                                while (reader.pos < end2) {
                                    var tag2 = reader.uint32();
                                    switch (tag2 >>> 3) {
                                    case 1:
                                        key = reader.string();
                                        break;
                                    case 2:
                                        value = reader.string();
                                        break;
                                    default:
                                        reader.skipType(tag2 & 7);
                                        break;
                                    }
                                }
                                message.serviceClassNames[key] = value;
                                break;
                            }
                        case 3: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a JavaSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.JavaSettings} JavaSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                JavaSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a JavaSettings message.
                 * @function verify
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                JavaSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage"))
                        if (!$util.isString(message.libraryPackage))
                            return "libraryPackage: string expected";
                    if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) {
                        if (!$util.isObject(message.serviceClassNames))
                            return "serviceClassNames: object expected";
                        var key = Object.keys(message.serviceClassNames);
                        for (var i = 0; i < key.length; ++i)
                            if (!$util.isString(message.serviceClassNames[key[i]]))
                                return "serviceClassNames: string{k:string} expected";
                    }
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.JavaSettings} JavaSettings
                 */
                JavaSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.JavaSettings)
                        return object;
                    var message = new $root.google.api.JavaSettings();
                    if (object.libraryPackage != null)
                        message.libraryPackage = String(object.libraryPackage);
                    if (object.serviceClassNames) {
                        if (typeof object.serviceClassNames !== "object")
                            throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");
                        message.serviceClassNames = {};
                        for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i)
                            message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]);
                    }
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.JavaSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a JavaSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {google.api.JavaSettings} message JavaSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                JavaSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.objects || options.defaults)
                        object.serviceClassNames = {};
                    if (options.defaults) {
                        object.libraryPackage = "";
                        object.common = null;
                    }
                    if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage"))
                        object.libraryPackage = message.libraryPackage;
                    var keys2;
                    if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) {
                        object.serviceClassNames = {};
                        for (var j = 0; j < keys2.length; ++j)
                            object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]];
                    }
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this JavaSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.JavaSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                JavaSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for JavaSettings
                 * @function getTypeUrl
                 * @memberof google.api.JavaSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.JavaSettings";
                };
    
                return JavaSettings;
            })();
    
            api.CppSettings = (function() {
    
                /**
                 * Properties of a CppSettings.
                 * @memberof google.api
                 * @interface ICppSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common
                 */
    
                /**
                 * Constructs a new CppSettings.
                 * @memberof google.api
                 * @classdesc Represents a CppSettings.
                 * @implements ICppSettings
                 * @constructor
                 * @param {google.api.ICppSettings=} [properties] Properties to set
                 */
                function CppSettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * CppSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.CppSettings
                 * @instance
                 */
                CppSettings.prototype.common = null;
    
                /**
                 * Creates a new CppSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {google.api.ICppSettings=} [properties] Properties to set
                 * @returns {google.api.CppSettings} CppSettings instance
                 */
                CppSettings.create = function create(properties) {
                    return new CppSettings(properties);
                };
    
                /**
                 * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {google.api.ICppSettings} message CppSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CppSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {google.api.ICppSettings} message CppSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CppSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a CppSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.CppSettings} CppSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CppSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a CppSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.CppSettings} CppSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CppSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a CppSettings message.
                 * @function verify
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CppSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a CppSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.CppSettings} CppSettings
                 */
                CppSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.CppSettings)
                        return object;
                    var message = new $root.google.api.CppSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.CppSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a CppSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {google.api.CppSettings} message CppSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CppSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this CppSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.CppSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CppSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for CppSettings
                 * @function getTypeUrl
                 * @memberof google.api.CppSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.CppSettings";
                };
    
                return CppSettings;
            })();
    
            api.PhpSettings = (function() {
    
                /**
                 * Properties of a PhpSettings.
                 * @memberof google.api
                 * @interface IPhpSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common
                 */
    
                /**
                 * Constructs a new PhpSettings.
                 * @memberof google.api
                 * @classdesc Represents a PhpSettings.
                 * @implements IPhpSettings
                 * @constructor
                 * @param {google.api.IPhpSettings=} [properties] Properties to set
                 */
                function PhpSettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * PhpSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.PhpSettings
                 * @instance
                 */
                PhpSettings.prototype.common = null;
    
                /**
                 * Creates a new PhpSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {google.api.IPhpSettings=} [properties] Properties to set
                 * @returns {google.api.PhpSettings} PhpSettings instance
                 */
                PhpSettings.create = function create(properties) {
                    return new PhpSettings(properties);
                };
    
                /**
                 * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PhpSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PhpSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a PhpSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.PhpSettings} PhpSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PhpSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a PhpSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.PhpSettings} PhpSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PhpSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a PhpSettings message.
                 * @function verify
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PhpSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.PhpSettings} PhpSettings
                 */
                PhpSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.PhpSettings)
                        return object;
                    var message = new $root.google.api.PhpSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.PhpSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a PhpSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {google.api.PhpSettings} message PhpSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PhpSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this PhpSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.PhpSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PhpSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for PhpSettings
                 * @function getTypeUrl
                 * @memberof google.api.PhpSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.PhpSettings";
                };
    
                return PhpSettings;
            })();
    
            api.PythonSettings = (function() {
    
                /**
                 * Properties of a PythonSettings.
                 * @memberof google.api
                 * @interface IPythonSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common
                 */
    
                /**
                 * Constructs a new PythonSettings.
                 * @memberof google.api
                 * @classdesc Represents a PythonSettings.
                 * @implements IPythonSettings
                 * @constructor
                 * @param {google.api.IPythonSettings=} [properties] Properties to set
                 */
                function PythonSettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * PythonSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.PythonSettings
                 * @instance
                 */
                PythonSettings.prototype.common = null;
    
                /**
                 * Creates a new PythonSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {google.api.IPythonSettings=} [properties] Properties to set
                 * @returns {google.api.PythonSettings} PythonSettings instance
                 */
                PythonSettings.create = function create(properties) {
                    return new PythonSettings(properties);
                };
    
                /**
                 * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PythonSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                PythonSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a PythonSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.PythonSettings} PythonSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PythonSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a PythonSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.PythonSettings} PythonSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                PythonSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a PythonSettings message.
                 * @function verify
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                PythonSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.PythonSettings} PythonSettings
                 */
                PythonSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.PythonSettings)
                        return object;
                    var message = new $root.google.api.PythonSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.PythonSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a PythonSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {google.api.PythonSettings} message PythonSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                PythonSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this PythonSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.PythonSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                PythonSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for PythonSettings
                 * @function getTypeUrl
                 * @memberof google.api.PythonSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.PythonSettings";
                };
    
                return PythonSettings;
            })();
    
            api.NodeSettings = (function() {
    
                /**
                 * Properties of a NodeSettings.
                 * @memberof google.api
                 * @interface INodeSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common
                 */
    
                /**
                 * Constructs a new NodeSettings.
                 * @memberof google.api
                 * @classdesc Represents a NodeSettings.
                 * @implements INodeSettings
                 * @constructor
                 * @param {google.api.INodeSettings=} [properties] Properties to set
                 */
                function NodeSettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * NodeSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.NodeSettings
                 * @instance
                 */
                NodeSettings.prototype.common = null;
    
                /**
                 * Creates a new NodeSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {google.api.INodeSettings=} [properties] Properties to set
                 * @returns {google.api.NodeSettings} NodeSettings instance
                 */
                NodeSettings.create = function create(properties) {
                    return new NodeSettings(properties);
                };
    
                /**
                 * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NodeSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                NodeSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a NodeSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.NodeSettings} NodeSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NodeSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a NodeSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.NodeSettings} NodeSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                NodeSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a NodeSettings message.
                 * @function verify
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                NodeSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.NodeSettings} NodeSettings
                 */
                NodeSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.NodeSettings)
                        return object;
                    var message = new $root.google.api.NodeSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.NodeSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a NodeSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {google.api.NodeSettings} message NodeSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                NodeSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this NodeSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.NodeSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                NodeSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for NodeSettings
                 * @function getTypeUrl
                 * @memberof google.api.NodeSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.NodeSettings";
                };
    
                return NodeSettings;
            })();
    
            api.DotnetSettings = (function() {
    
                /**
                 * Properties of a DotnetSettings.
                 * @memberof google.api
                 * @interface IDotnetSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common
                 * @property {Object.<string,string>|null} [renamedServices] DotnetSettings renamedServices
                 * @property {Object.<string,string>|null} [renamedResources] DotnetSettings renamedResources
                 * @property {Array.<string>|null} [ignoredResources] DotnetSettings ignoredResources
                 * @property {Array.<string>|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases
                 * @property {Array.<string>|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures
                 */
    
                /**
                 * Constructs a new DotnetSettings.
                 * @memberof google.api
                 * @classdesc Represents a DotnetSettings.
                 * @implements IDotnetSettings
                 * @constructor
                 * @param {google.api.IDotnetSettings=} [properties] Properties to set
                 */
                function DotnetSettings(properties) {
                    this.renamedServices = {};
                    this.renamedResources = {};
                    this.ignoredResources = [];
                    this.forcedNamespaceAliases = [];
                    this.handwrittenSignatures = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * DotnetSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.common = null;
    
                /**
                 * DotnetSettings renamedServices.
                 * @member {Object.<string,string>} renamedServices
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.renamedServices = $util.emptyObject;
    
                /**
                 * DotnetSettings renamedResources.
                 * @member {Object.<string,string>} renamedResources
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.renamedResources = $util.emptyObject;
    
                /**
                 * DotnetSettings ignoredResources.
                 * @member {Array.<string>} ignoredResources
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.ignoredResources = $util.emptyArray;
    
                /**
                 * DotnetSettings forcedNamespaceAliases.
                 * @member {Array.<string>} forcedNamespaceAliases
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray;
    
                /**
                 * DotnetSettings handwrittenSignatures.
                 * @member {Array.<string>} handwrittenSignatures
                 * @memberof google.api.DotnetSettings
                 * @instance
                 */
                DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray;
    
                /**
                 * Creates a new DotnetSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {google.api.IDotnetSettings=} [properties] Properties to set
                 * @returns {google.api.DotnetSettings} DotnetSettings instance
                 */
                DotnetSettings.create = function create(properties) {
                    return new DotnetSettings(properties);
                };
    
                /**
                 * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DotnetSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices"))
                        for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i)
                            writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim();
                    if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources"))
                        for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i)
                            writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim();
                    if (message.ignoredResources != null && message.ignoredResources.length)
                        for (var i = 0; i < message.ignoredResources.length; ++i)
                            writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]);
                    if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length)
                        for (var i = 0; i < message.forcedNamespaceAliases.length; ++i)
                            writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]);
                    if (message.handwrittenSignatures != null && message.handwrittenSignatures.length)
                        for (var i = 0; i < message.handwrittenSignatures.length; ++i)
                            writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]);
                    return writer;
                };
    
                /**
                 * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a DotnetSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.DotnetSettings} DotnetSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DotnetSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value;
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        case 2: {
                                if (message.renamedServices === $util.emptyObject)
                                    message.renamedServices = {};
                                var end2 = reader.uint32() + reader.pos;
                                key = "";
                                value = "";
                                while (reader.pos < end2) {
                                    var tag2 = reader.uint32();
                                    switch (tag2 >>> 3) {
                                    case 1:
                                        key = reader.string();
                                        break;
                                    case 2:
                                        value = reader.string();
                                        break;
                                    default:
                                        reader.skipType(tag2 & 7);
                                        break;
                                    }
                                }
                                message.renamedServices[key] = value;
                                break;
                            }
                        case 3: {
                                if (message.renamedResources === $util.emptyObject)
                                    message.renamedResources = {};
                                var end2 = reader.uint32() + reader.pos;
                                key = "";
                                value = "";
                                while (reader.pos < end2) {
                                    var tag2 = reader.uint32();
                                    switch (tag2 >>> 3) {
                                    case 1:
                                        key = reader.string();
                                        break;
                                    case 2:
                                        value = reader.string();
                                        break;
                                    default:
                                        reader.skipType(tag2 & 7);
                                        break;
                                    }
                                }
                                message.renamedResources[key] = value;
                                break;
                            }
                        case 4: {
                                if (!(message.ignoredResources && message.ignoredResources.length))
                                    message.ignoredResources = [];
                                message.ignoredResources.push(reader.string());
                                break;
                            }
                        case 5: {
                                if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length))
                                    message.forcedNamespaceAliases = [];
                                message.forcedNamespaceAliases.push(reader.string());
                                break;
                            }
                        case 6: {
                                if (!(message.handwrittenSignatures && message.handwrittenSignatures.length))
                                    message.handwrittenSignatures = [];
                                message.handwrittenSignatures.push(reader.string());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a DotnetSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.DotnetSettings} DotnetSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DotnetSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a DotnetSettings message.
                 * @function verify
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DotnetSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) {
                        if (!$util.isObject(message.renamedServices))
                            return "renamedServices: object expected";
                        var key = Object.keys(message.renamedServices);
                        for (var i = 0; i < key.length; ++i)
                            if (!$util.isString(message.renamedServices[key[i]]))
                                return "renamedServices: string{k:string} expected";
                    }
                    if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) {
                        if (!$util.isObject(message.renamedResources))
                            return "renamedResources: object expected";
                        var key = Object.keys(message.renamedResources);
                        for (var i = 0; i < key.length; ++i)
                            if (!$util.isString(message.renamedResources[key[i]]))
                                return "renamedResources: string{k:string} expected";
                    }
                    if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) {
                        if (!Array.isArray(message.ignoredResources))
                            return "ignoredResources: array expected";
                        for (var i = 0; i < message.ignoredResources.length; ++i)
                            if (!$util.isString(message.ignoredResources[i]))
                                return "ignoredResources: string[] expected";
                    }
                    if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) {
                        if (!Array.isArray(message.forcedNamespaceAliases))
                            return "forcedNamespaceAliases: array expected";
                        for (var i = 0; i < message.forcedNamespaceAliases.length; ++i)
                            if (!$util.isString(message.forcedNamespaceAliases[i]))
                                return "forcedNamespaceAliases: string[] expected";
                    }
                    if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) {
                        if (!Array.isArray(message.handwrittenSignatures))
                            return "handwrittenSignatures: array expected";
                        for (var i = 0; i < message.handwrittenSignatures.length; ++i)
                            if (!$util.isString(message.handwrittenSignatures[i]))
                                return "handwrittenSignatures: string[] expected";
                    }
                    return null;
                };
    
                /**
                 * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.DotnetSettings} DotnetSettings
                 */
                DotnetSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.DotnetSettings)
                        return object;
                    var message = new $root.google.api.DotnetSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.DotnetSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    if (object.renamedServices) {
                        if (typeof object.renamedServices !== "object")
                            throw TypeError(".google.api.DotnetSettings.renamedServices: object expected");
                        message.renamedServices = {};
                        for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i)
                            message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]);
                    }
                    if (object.renamedResources) {
                        if (typeof object.renamedResources !== "object")
                            throw TypeError(".google.api.DotnetSettings.renamedResources: object expected");
                        message.renamedResources = {};
                        for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i)
                            message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]);
                    }
                    if (object.ignoredResources) {
                        if (!Array.isArray(object.ignoredResources))
                            throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected");
                        message.ignoredResources = [];
                        for (var i = 0; i < object.ignoredResources.length; ++i)
                            message.ignoredResources[i] = String(object.ignoredResources[i]);
                    }
                    if (object.forcedNamespaceAliases) {
                        if (!Array.isArray(object.forcedNamespaceAliases))
                            throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected");
                        message.forcedNamespaceAliases = [];
                        for (var i = 0; i < object.forcedNamespaceAliases.length; ++i)
                            message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]);
                    }
                    if (object.handwrittenSignatures) {
                        if (!Array.isArray(object.handwrittenSignatures))
                            throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected");
                        message.handwrittenSignatures = [];
                        for (var i = 0; i < object.handwrittenSignatures.length; ++i)
                            message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {google.api.DotnetSettings} message DotnetSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DotnetSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.ignoredResources = [];
                        object.forcedNamespaceAliases = [];
                        object.handwrittenSignatures = [];
                    }
                    if (options.objects || options.defaults) {
                        object.renamedServices = {};
                        object.renamedResources = {};
                    }
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    var keys2;
                    if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) {
                        object.renamedServices = {};
                        for (var j = 0; j < keys2.length; ++j)
                            object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]];
                    }
                    if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) {
                        object.renamedResources = {};
                        for (var j = 0; j < keys2.length; ++j)
                            object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]];
                    }
                    if (message.ignoredResources && message.ignoredResources.length) {
                        object.ignoredResources = [];
                        for (var j = 0; j < message.ignoredResources.length; ++j)
                            object.ignoredResources[j] = message.ignoredResources[j];
                    }
                    if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) {
                        object.forcedNamespaceAliases = [];
                        for (var j = 0; j < message.forcedNamespaceAliases.length; ++j)
                            object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j];
                    }
                    if (message.handwrittenSignatures && message.handwrittenSignatures.length) {
                        object.handwrittenSignatures = [];
                        for (var j = 0; j < message.handwrittenSignatures.length; ++j)
                            object.handwrittenSignatures[j] = message.handwrittenSignatures[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this DotnetSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.DotnetSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DotnetSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for DotnetSettings
                 * @function getTypeUrl
                 * @memberof google.api.DotnetSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.DotnetSettings";
                };
    
                return DotnetSettings;
            })();
    
            api.RubySettings = (function() {
    
                /**
                 * Properties of a RubySettings.
                 * @memberof google.api
                 * @interface IRubySettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common
                 */
    
                /**
                 * Constructs a new RubySettings.
                 * @memberof google.api
                 * @classdesc Represents a RubySettings.
                 * @implements IRubySettings
                 * @constructor
                 * @param {google.api.IRubySettings=} [properties] Properties to set
                 */
                function RubySettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * RubySettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.RubySettings
                 * @instance
                 */
                RubySettings.prototype.common = null;
    
                /**
                 * Creates a new RubySettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {google.api.IRubySettings=} [properties] Properties to set
                 * @returns {google.api.RubySettings} RubySettings instance
                 */
                RubySettings.create = function create(properties) {
                    return new RubySettings(properties);
                };
    
                /**
                 * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {google.api.IRubySettings} message RubySettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RubySettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {google.api.IRubySettings} message RubySettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                RubySettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a RubySettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.RubySettings} RubySettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RubySettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a RubySettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.RubySettings} RubySettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                RubySettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a RubySettings message.
                 * @function verify
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                RubySettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a RubySettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.RubySettings} RubySettings
                 */
                RubySettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.RubySettings)
                        return object;
                    var message = new $root.google.api.RubySettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.RubySettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a RubySettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {google.api.RubySettings} message RubySettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                RubySettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this RubySettings to JSON.
                 * @function toJSON
                 * @memberof google.api.RubySettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                RubySettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for RubySettings
                 * @function getTypeUrl
                 * @memberof google.api.RubySettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.RubySettings";
                };
    
                return RubySettings;
            })();
    
            api.GoSettings = (function() {
    
                /**
                 * Properties of a GoSettings.
                 * @memberof google.api
                 * @interface IGoSettings
                 * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common
                 */
    
                /**
                 * Constructs a new GoSettings.
                 * @memberof google.api
                 * @classdesc Represents a GoSettings.
                 * @implements IGoSettings
                 * @constructor
                 * @param {google.api.IGoSettings=} [properties] Properties to set
                 */
                function GoSettings(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * GoSettings common.
                 * @member {google.api.ICommonLanguageSettings|null|undefined} common
                 * @memberof google.api.GoSettings
                 * @instance
                 */
                GoSettings.prototype.common = null;
    
                /**
                 * Creates a new GoSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {google.api.IGoSettings=} [properties] Properties to set
                 * @returns {google.api.GoSettings} GoSettings instance
                 */
                GoSettings.create = function create(properties) {
                    return new GoSettings(properties);
                };
    
                /**
                 * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {google.api.IGoSettings} message GoSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GoSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.common != null && Object.hasOwnProperty.call(message, "common"))
                        $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {google.api.IGoSettings} message GoSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GoSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a GoSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.GoSettings} GoSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GoSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a GoSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.GoSettings} GoSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GoSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a GoSettings message.
                 * @function verify
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GoSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.common != null && message.hasOwnProperty("common")) {
                        var error = $root.google.api.CommonLanguageSettings.verify(message.common);
                        if (error)
                            return "common." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a GoSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.GoSettings} GoSettings
                 */
                GoSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.GoSettings)
                        return object;
                    var message = new $root.google.api.GoSettings();
                    if (object.common != null) {
                        if (typeof object.common !== "object")
                            throw TypeError(".google.api.GoSettings.common: object expected");
                        message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a GoSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {google.api.GoSettings} message GoSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GoSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.common = null;
                    if (message.common != null && message.hasOwnProperty("common"))
                        object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options);
                    return object;
                };
    
                /**
                 * Converts this GoSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.GoSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GoSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for GoSettings
                 * @function getTypeUrl
                 * @memberof google.api.GoSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.GoSettings";
                };
    
                return GoSettings;
            })();
    
            api.MethodSettings = (function() {
    
                /**
                 * Properties of a MethodSettings.
                 * @memberof google.api
                 * @interface IMethodSettings
                 * @property {string|null} [selector] MethodSettings selector
                 * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning
                 * @property {Array.<string>|null} [autoPopulatedFields] MethodSettings autoPopulatedFields
                 */
    
                /**
                 * Constructs a new MethodSettings.
                 * @memberof google.api
                 * @classdesc Represents a MethodSettings.
                 * @implements IMethodSettings
                 * @constructor
                 * @param {google.api.IMethodSettings=} [properties] Properties to set
                 */
                function MethodSettings(properties) {
                    this.autoPopulatedFields = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * MethodSettings selector.
                 * @member {string} selector
                 * @memberof google.api.MethodSettings
                 * @instance
                 */
                MethodSettings.prototype.selector = "";
    
                /**
                 * MethodSettings longRunning.
                 * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning
                 * @memberof google.api.MethodSettings
                 * @instance
                 */
                MethodSettings.prototype.longRunning = null;
    
                /**
                 * MethodSettings autoPopulatedFields.
                 * @member {Array.<string>} autoPopulatedFields
                 * @memberof google.api.MethodSettings
                 * @instance
                 */
                MethodSettings.prototype.autoPopulatedFields = $util.emptyArray;
    
                /**
                 * Creates a new MethodSettings instance using the specified properties.
                 * @function create
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {google.api.IMethodSettings=} [properties] Properties to set
                 * @returns {google.api.MethodSettings} MethodSettings instance
                 */
                MethodSettings.create = function create(properties) {
                    return new MethodSettings(properties);
                };
    
                /**
                 * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodSettings.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.selector != null && Object.hasOwnProperty.call(message, "selector"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector);
                    if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning"))
                        $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.autoPopulatedFields != null && message.autoPopulatedFields.length)
                        for (var i = 0; i < message.autoPopulatedFields.length; ++i)
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]);
                    return writer;
                };
    
                /**
                 * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodSettings.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a MethodSettings message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.MethodSettings} MethodSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodSettings.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.selector = reader.string();
                                break;
                            }
                        case 2: {
                                message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                if (!(message.autoPopulatedFields && message.autoPopulatedFields.length))
                                    message.autoPopulatedFields = [];
                                message.autoPopulatedFields.push(reader.string());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a MethodSettings message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.MethodSettings} MethodSettings
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodSettings.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a MethodSettings message.
                 * @function verify
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MethodSettings.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.selector != null && message.hasOwnProperty("selector"))
                        if (!$util.isString(message.selector))
                            return "selector: string expected";
                    if (message.longRunning != null && message.hasOwnProperty("longRunning")) {
                        var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning);
                        if (error)
                            return "longRunning." + error;
                    }
                    if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) {
                        if (!Array.isArray(message.autoPopulatedFields))
                            return "autoPopulatedFields: array expected";
                        for (var i = 0; i < message.autoPopulatedFields.length; ++i)
                            if (!$util.isString(message.autoPopulatedFields[i]))
                                return "autoPopulatedFields: string[] expected";
                    }
                    return null;
                };
    
                /**
                 * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.MethodSettings} MethodSettings
                 */
                MethodSettings.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.MethodSettings)
                        return object;
                    var message = new $root.google.api.MethodSettings();
                    if (object.selector != null)
                        message.selector = String(object.selector);
                    if (object.longRunning != null) {
                        if (typeof object.longRunning !== "object")
                            throw TypeError(".google.api.MethodSettings.longRunning: object expected");
                        message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning);
                    }
                    if (object.autoPopulatedFields) {
                        if (!Array.isArray(object.autoPopulatedFields))
                            throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected");
                        message.autoPopulatedFields = [];
                        for (var i = 0; i < object.autoPopulatedFields.length; ++i)
                            message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a MethodSettings message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {google.api.MethodSettings} message MethodSettings
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MethodSettings.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.autoPopulatedFields = [];
                    if (options.defaults) {
                        object.selector = "";
                        object.longRunning = null;
                    }
                    if (message.selector != null && message.hasOwnProperty("selector"))
                        object.selector = message.selector;
                    if (message.longRunning != null && message.hasOwnProperty("longRunning"))
                        object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options);
                    if (message.autoPopulatedFields && message.autoPopulatedFields.length) {
                        object.autoPopulatedFields = [];
                        for (var j = 0; j < message.autoPopulatedFields.length; ++j)
                            object.autoPopulatedFields[j] = message.autoPopulatedFields[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this MethodSettings to JSON.
                 * @function toJSON
                 * @memberof google.api.MethodSettings
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MethodSettings.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for MethodSettings
                 * @function getTypeUrl
                 * @memberof google.api.MethodSettings
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.MethodSettings";
                };
    
                MethodSettings.LongRunning = (function() {
    
                    /**
                     * Properties of a LongRunning.
                     * @memberof google.api.MethodSettings
                     * @interface ILongRunning
                     * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay
                     * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier
                     * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay
                     * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout
                     */
    
                    /**
                     * Constructs a new LongRunning.
                     * @memberof google.api.MethodSettings
                     * @classdesc Represents a LongRunning.
                     * @implements ILongRunning
                     * @constructor
                     * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set
                     */
                    function LongRunning(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * LongRunning initialPollDelay.
                     * @member {google.protobuf.IDuration|null|undefined} initialPollDelay
                     * @memberof google.api.MethodSettings.LongRunning
                     * @instance
                     */
                    LongRunning.prototype.initialPollDelay = null;
    
                    /**
                     * LongRunning pollDelayMultiplier.
                     * @member {number} pollDelayMultiplier
                     * @memberof google.api.MethodSettings.LongRunning
                     * @instance
                     */
                    LongRunning.prototype.pollDelayMultiplier = 0;
    
                    /**
                     * LongRunning maxPollDelay.
                     * @member {google.protobuf.IDuration|null|undefined} maxPollDelay
                     * @memberof google.api.MethodSettings.LongRunning
                     * @instance
                     */
                    LongRunning.prototype.maxPollDelay = null;
    
                    /**
                     * LongRunning totalPollTimeout.
                     * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout
                     * @memberof google.api.MethodSettings.LongRunning
                     * @instance
                     */
                    LongRunning.prototype.totalPollTimeout = null;
    
                    /**
                     * Creates a new LongRunning instance using the specified properties.
                     * @function create
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set
                     * @returns {google.api.MethodSettings.LongRunning} LongRunning instance
                     */
                    LongRunning.create = function create(properties) {
                        return new LongRunning(properties);
                    };
    
                    /**
                     * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
                     * @function encode
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    LongRunning.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay"))
                            $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                        if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier"))
                            writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier);
                        if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay"))
                            $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                        if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout"))
                            $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                        return writer;
                    };
    
                    /**
                     * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    LongRunning.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a LongRunning message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.api.MethodSettings.LongRunning} LongRunning
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    LongRunning.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32());
                                    break;
                                }
                            case 2: {
                                    message.pollDelayMultiplier = reader.float();
                                    break;
                                }
                            case 3: {
                                    message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32());
                                    break;
                                }
                            case 4: {
                                    message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes a LongRunning message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.api.MethodSettings.LongRunning} LongRunning
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    LongRunning.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a LongRunning message.
                     * @function verify
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    LongRunning.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) {
                            var error = $root.google.protobuf.Duration.verify(message.initialPollDelay);
                            if (error)
                                return "initialPollDelay." + error;
                        }
                        if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier"))
                            if (typeof message.pollDelayMultiplier !== "number")
                                return "pollDelayMultiplier: number expected";
                        if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) {
                            var error = $root.google.protobuf.Duration.verify(message.maxPollDelay);
                            if (error)
                                return "maxPollDelay." + error;
                        }
                        if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) {
                            var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout);
                            if (error)
                                return "totalPollTimeout." + error;
                        }
                        return null;
                    };
    
                    /**
                     * Creates a LongRunning message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.api.MethodSettings.LongRunning} LongRunning
                     */
                    LongRunning.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.api.MethodSettings.LongRunning)
                            return object;
                        var message = new $root.google.api.MethodSettings.LongRunning();
                        if (object.initialPollDelay != null) {
                            if (typeof object.initialPollDelay !== "object")
                                throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");
                            message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay);
                        }
                        if (object.pollDelayMultiplier != null)
                            message.pollDelayMultiplier = Number(object.pollDelayMultiplier);
                        if (object.maxPollDelay != null) {
                            if (typeof object.maxPollDelay !== "object")
                                throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");
                            message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay);
                        }
                        if (object.totalPollTimeout != null) {
                            if (typeof object.totalPollTimeout !== "object")
                                throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");
                            message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout);
                        }
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a LongRunning message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {google.api.MethodSettings.LongRunning} message LongRunning
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    LongRunning.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.initialPollDelay = null;
                            object.pollDelayMultiplier = 0;
                            object.maxPollDelay = null;
                            object.totalPollTimeout = null;
                        }
                        if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay"))
                            object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options);
                        if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier"))
                            object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier;
                        if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay"))
                            object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options);
                        if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout"))
                            object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options);
                        return object;
                    };
    
                    /**
                     * Converts this LongRunning to JSON.
                     * @function toJSON
                     * @memberof google.api.MethodSettings.LongRunning
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    LongRunning.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for LongRunning
                     * @function getTypeUrl
                     * @memberof google.api.MethodSettings.LongRunning
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.api.MethodSettings.LongRunning";
                    };
    
                    return LongRunning;
                })();
    
                return MethodSettings;
            })();
    
            /**
             * ClientLibraryOrganization enum.
             * @name google.api.ClientLibraryOrganization
             * @enum {number}
             * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value
             * @property {number} CLOUD=1 CLOUD value
             * @property {number} ADS=2 ADS value
             * @property {number} PHOTOS=3 PHOTOS value
             * @property {number} STREET_VIEW=4 STREET_VIEW value
             * @property {number} SHOPPING=5 SHOPPING value
             * @property {number} GEO=6 GEO value
             * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value
             */
            api.ClientLibraryOrganization = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0;
                values[valuesById[1] = "CLOUD"] = 1;
                values[valuesById[2] = "ADS"] = 2;
                values[valuesById[3] = "PHOTOS"] = 3;
                values[valuesById[4] = "STREET_VIEW"] = 4;
                values[valuesById[5] = "SHOPPING"] = 5;
                values[valuesById[6] = "GEO"] = 6;
                values[valuesById[7] = "GENERATIVE_AI"] = 7;
                return values;
            })();
    
            /**
             * ClientLibraryDestination enum.
             * @name google.api.ClientLibraryDestination
             * @enum {number}
             * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value
             * @property {number} GITHUB=10 GITHUB value
             * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value
             */
            api.ClientLibraryDestination = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0;
                values[valuesById[10] = "GITHUB"] = 10;
                values[valuesById[20] = "PACKAGE_MANAGER"] = 20;
                return values;
            })();
    
            /**
             * LaunchStage enum.
             * @name google.api.LaunchStage
             * @enum {number}
             * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value
             * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value
             * @property {number} PRELAUNCH=7 PRELAUNCH value
             * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value
             * @property {number} ALPHA=2 ALPHA value
             * @property {number} BETA=3 BETA value
             * @property {number} GA=4 GA value
             * @property {number} DEPRECATED=5 DEPRECATED value
             */
            api.LaunchStage = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0;
                values[valuesById[6] = "UNIMPLEMENTED"] = 6;
                values[valuesById[7] = "PRELAUNCH"] = 7;
                values[valuesById[1] = "EARLY_ACCESS"] = 1;
                values[valuesById[2] = "ALPHA"] = 2;
                values[valuesById[3] = "BETA"] = 3;
                values[valuesById[4] = "GA"] = 4;
                values[valuesById[5] = "DEPRECATED"] = 5;
                return values;
            })();
    
            /**
             * FieldBehavior enum.
             * @name google.api.FieldBehavior
             * @enum {number}
             * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value
             * @property {number} OPTIONAL=1 OPTIONAL value
             * @property {number} REQUIRED=2 REQUIRED value
             * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value
             * @property {number} INPUT_ONLY=4 INPUT_ONLY value
             * @property {number} IMMUTABLE=5 IMMUTABLE value
             * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value
             * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value
             * @property {number} IDENTIFIER=8 IDENTIFIER value
             */
            api.FieldBehavior = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0;
                values[valuesById[1] = "OPTIONAL"] = 1;
                values[valuesById[2] = "REQUIRED"] = 2;
                values[valuesById[3] = "OUTPUT_ONLY"] = 3;
                values[valuesById[4] = "INPUT_ONLY"] = 4;
                values[valuesById[5] = "IMMUTABLE"] = 5;
                values[valuesById[6] = "UNORDERED_LIST"] = 6;
                values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7;
                values[valuesById[8] = "IDENTIFIER"] = 8;
                return values;
            })();
    
            api.ResourceDescriptor = (function() {
    
                /**
                 * Properties of a ResourceDescriptor.
                 * @memberof google.api
                 * @interface IResourceDescriptor
                 * @property {string|null} [type] ResourceDescriptor type
                 * @property {Array.<string>|null} [pattern] ResourceDescriptor pattern
                 * @property {string|null} [nameField] ResourceDescriptor nameField
                 * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history
                 * @property {string|null} [plural] ResourceDescriptor plural
                 * @property {string|null} [singular] ResourceDescriptor singular
                 * @property {Array.<google.api.ResourceDescriptor.Style>|null} [style] ResourceDescriptor style
                 */
    
                /**
                 * Constructs a new ResourceDescriptor.
                 * @memberof google.api
                 * @classdesc Represents a ResourceDescriptor.
                 * @implements IResourceDescriptor
                 * @constructor
                 * @param {google.api.IResourceDescriptor=} [properties] Properties to set
                 */
                function ResourceDescriptor(properties) {
                    this.pattern = [];
                    this.style = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ResourceDescriptor type.
                 * @member {string} type
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.type = "";
    
                /**
                 * ResourceDescriptor pattern.
                 * @member {Array.<string>} pattern
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.pattern = $util.emptyArray;
    
                /**
                 * ResourceDescriptor nameField.
                 * @member {string} nameField
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.nameField = "";
    
                /**
                 * ResourceDescriptor history.
                 * @member {google.api.ResourceDescriptor.History} history
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.history = 0;
    
                /**
                 * ResourceDescriptor plural.
                 * @member {string} plural
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.plural = "";
    
                /**
                 * ResourceDescriptor singular.
                 * @member {string} singular
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.singular = "";
    
                /**
                 * ResourceDescriptor style.
                 * @member {Array.<google.api.ResourceDescriptor.Style>} style
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 */
                ResourceDescriptor.prototype.style = $util.emptyArray;
    
                /**
                 * Creates a new ResourceDescriptor instance using the specified properties.
                 * @function create
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {google.api.IResourceDescriptor=} [properties] Properties to set
                 * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance
                 */
                ResourceDescriptor.create = function create(properties) {
                    return new ResourceDescriptor(properties);
                };
    
                /**
                 * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ResourceDescriptor.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
                    if (message.pattern != null && message.pattern.length)
                        for (var i = 0; i < message.pattern.length; ++i)
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]);
                    if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField);
                    if (message.history != null && Object.hasOwnProperty.call(message, "history"))
                        writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history);
                    if (message.plural != null && Object.hasOwnProperty.call(message, "plural"))
                        writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural);
                    if (message.singular != null && Object.hasOwnProperty.call(message, "singular"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular);
                    if (message.style != null && message.style.length) {
                        writer.uint32(/* id 10, wireType 2 =*/82).fork();
                        for (var i = 0; i < message.style.length; ++i)
                            writer.int32(message.style[i]);
                        writer.ldelim();
                    }
                    return writer;
                };
    
                /**
                 * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ResourceDescriptor message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.ResourceDescriptor} ResourceDescriptor
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ResourceDescriptor.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.type = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.pattern && message.pattern.length))
                                    message.pattern = [];
                                message.pattern.push(reader.string());
                                break;
                            }
                        case 3: {
                                message.nameField = reader.string();
                                break;
                            }
                        case 4: {
                                message.history = reader.int32();
                                break;
                            }
                        case 5: {
                                message.plural = reader.string();
                                break;
                            }
                        case 6: {
                                message.singular = reader.string();
                                break;
                            }
                        case 10: {
                                if (!(message.style && message.style.length))
                                    message.style = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message.style.push(reader.int32());
                                } else
                                    message.style.push(reader.int32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.ResourceDescriptor} ResourceDescriptor
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ResourceDescriptor message.
                 * @function verify
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ResourceDescriptor.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.type != null && message.hasOwnProperty("type"))
                        if (!$util.isString(message.type))
                            return "type: string expected";
                    if (message.pattern != null && message.hasOwnProperty("pattern")) {
                        if (!Array.isArray(message.pattern))
                            return "pattern: array expected";
                        for (var i = 0; i < message.pattern.length; ++i)
                            if (!$util.isString(message.pattern[i]))
                                return "pattern: string[] expected";
                    }
                    if (message.nameField != null && message.hasOwnProperty("nameField"))
                        if (!$util.isString(message.nameField))
                            return "nameField: string expected";
                    if (message.history != null && message.hasOwnProperty("history"))
                        switch (message.history) {
                        default:
                            return "history: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.plural != null && message.hasOwnProperty("plural"))
                        if (!$util.isString(message.plural))
                            return "plural: string expected";
                    if (message.singular != null && message.hasOwnProperty("singular"))
                        if (!$util.isString(message.singular))
                            return "singular: string expected";
                    if (message.style != null && message.hasOwnProperty("style")) {
                        if (!Array.isArray(message.style))
                            return "style: array expected";
                        for (var i = 0; i < message.style.length; ++i)
                            switch (message.style[i]) {
                            default:
                                return "style: enum value[] expected";
                            case 0:
                            case 1:
                                break;
                            }
                    }
                    return null;
                };
    
                /**
                 * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.ResourceDescriptor} ResourceDescriptor
                 */
                ResourceDescriptor.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.ResourceDescriptor)
                        return object;
                    var message = new $root.google.api.ResourceDescriptor();
                    if (object.type != null)
                        message.type = String(object.type);
                    if (object.pattern) {
                        if (!Array.isArray(object.pattern))
                            throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");
                        message.pattern = [];
                        for (var i = 0; i < object.pattern.length; ++i)
                            message.pattern[i] = String(object.pattern[i]);
                    }
                    if (object.nameField != null)
                        message.nameField = String(object.nameField);
                    switch (object.history) {
                    default:
                        if (typeof object.history === "number") {
                            message.history = object.history;
                            break;
                        }
                        break;
                    case "HISTORY_UNSPECIFIED":
                    case 0:
                        message.history = 0;
                        break;
                    case "ORIGINALLY_SINGLE_PATTERN":
                    case 1:
                        message.history = 1;
                        break;
                    case "FUTURE_MULTI_PATTERN":
                    case 2:
                        message.history = 2;
                        break;
                    }
                    if (object.plural != null)
                        message.plural = String(object.plural);
                    if (object.singular != null)
                        message.singular = String(object.singular);
                    if (object.style) {
                        if (!Array.isArray(object.style))
                            throw TypeError(".google.api.ResourceDescriptor.style: array expected");
                        message.style = [];
                        for (var i = 0; i < object.style.length; ++i)
                            switch (object.style[i]) {
                            default:
                                if (typeof object.style[i] === "number") {
                                    message.style[i] = object.style[i];
                                    break;
                                }
                            case "STYLE_UNSPECIFIED":
                            case 0:
                                message.style[i] = 0;
                                break;
                            case "DECLARATIVE_FRIENDLY":
                            case 1:
                                message.style[i] = 1;
                                break;
                            }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {google.api.ResourceDescriptor} message ResourceDescriptor
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ResourceDescriptor.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.pattern = [];
                        object.style = [];
                    }
                    if (options.defaults) {
                        object.type = "";
                        object.nameField = "";
                        object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0;
                        object.plural = "";
                        object.singular = "";
                    }
                    if (message.type != null && message.hasOwnProperty("type"))
                        object.type = message.type;
                    if (message.pattern && message.pattern.length) {
                        object.pattern = [];
                        for (var j = 0; j < message.pattern.length; ++j)
                            object.pattern[j] = message.pattern[j];
                    }
                    if (message.nameField != null && message.hasOwnProperty("nameField"))
                        object.nameField = message.nameField;
                    if (message.history != null && message.hasOwnProperty("history"))
                        object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history;
                    if (message.plural != null && message.hasOwnProperty("plural"))
                        object.plural = message.plural;
                    if (message.singular != null && message.hasOwnProperty("singular"))
                        object.singular = message.singular;
                    if (message.style && message.style.length) {
                        object.style = [];
                        for (var j = 0; j < message.style.length; ++j)
                            object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this ResourceDescriptor to JSON.
                 * @function toJSON
                 * @memberof google.api.ResourceDescriptor
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ResourceDescriptor.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ResourceDescriptor
                 * @function getTypeUrl
                 * @memberof google.api.ResourceDescriptor
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.ResourceDescriptor";
                };
    
                /**
                 * History enum.
                 * @name google.api.ResourceDescriptor.History
                 * @enum {number}
                 * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value
                 * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value
                 * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value
                 */
                ResourceDescriptor.History = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1;
                    values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2;
                    return values;
                })();
    
                /**
                 * Style enum.
                 * @name google.api.ResourceDescriptor.Style
                 * @enum {number}
                 * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value
                 * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value
                 */
                ResourceDescriptor.Style = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0;
                    values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1;
                    return values;
                })();
    
                return ResourceDescriptor;
            })();
    
            api.ResourceReference = (function() {
    
                /**
                 * Properties of a ResourceReference.
                 * @memberof google.api
                 * @interface IResourceReference
                 * @property {string|null} [type] ResourceReference type
                 * @property {string|null} [childType] ResourceReference childType
                 */
    
                /**
                 * Constructs a new ResourceReference.
                 * @memberof google.api
                 * @classdesc Represents a ResourceReference.
                 * @implements IResourceReference
                 * @constructor
                 * @param {google.api.IResourceReference=} [properties] Properties to set
                 */
                function ResourceReference(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ResourceReference type.
                 * @member {string} type
                 * @memberof google.api.ResourceReference
                 * @instance
                 */
                ResourceReference.prototype.type = "";
    
                /**
                 * ResourceReference childType.
                 * @member {string} childType
                 * @memberof google.api.ResourceReference
                 * @instance
                 */
                ResourceReference.prototype.childType = "";
    
                /**
                 * Creates a new ResourceReference instance using the specified properties.
                 * @function create
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {google.api.IResourceReference=} [properties] Properties to set
                 * @returns {google.api.ResourceReference} ResourceReference instance
                 */
                ResourceReference.create = function create(properties) {
                    return new ResourceReference(properties);
                };
    
                /**
                 * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
                 * @function encode
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ResourceReference.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.type);
                    if (message.childType != null && Object.hasOwnProperty.call(message, "childType"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType);
                    return writer;
                };
    
                /**
                 * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ResourceReference.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ResourceReference message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.api.ResourceReference} ResourceReference
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ResourceReference.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.type = reader.string();
                                break;
                            }
                        case 2: {
                                message.childType = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ResourceReference message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.api.ResourceReference} ResourceReference
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ResourceReference.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ResourceReference message.
                 * @function verify
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ResourceReference.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.type != null && message.hasOwnProperty("type"))
                        if (!$util.isString(message.type))
                            return "type: string expected";
                    if (message.childType != null && message.hasOwnProperty("childType"))
                        if (!$util.isString(message.childType))
                            return "childType: string expected";
                    return null;
                };
    
                /**
                 * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.api.ResourceReference} ResourceReference
                 */
                ResourceReference.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.api.ResourceReference)
                        return object;
                    var message = new $root.google.api.ResourceReference();
                    if (object.type != null)
                        message.type = String(object.type);
                    if (object.childType != null)
                        message.childType = String(object.childType);
                    return message;
                };
    
                /**
                 * Creates a plain object from a ResourceReference message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {google.api.ResourceReference} message ResourceReference
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ResourceReference.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.type = "";
                        object.childType = "";
                    }
                    if (message.type != null && message.hasOwnProperty("type"))
                        object.type = message.type;
                    if (message.childType != null && message.hasOwnProperty("childType"))
                        object.childType = message.childType;
                    return object;
                };
    
                /**
                 * Converts this ResourceReference to JSON.
                 * @function toJSON
                 * @memberof google.api.ResourceReference
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ResourceReference.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ResourceReference
                 * @function getTypeUrl
                 * @memberof google.api.ResourceReference
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.api.ResourceReference";
                };
    
                return ResourceReference;
            })();
    
            return api;
        })();
    
        google.protobuf = (function() {
    
            /**
             * Namespace protobuf.
             * @memberof google
             * @namespace
             */
            var protobuf = {};
    
            protobuf.FileDescriptorSet = (function() {
    
                /**
                 * Properties of a FileDescriptorSet.
                 * @memberof google.protobuf
                 * @interface IFileDescriptorSet
                 * @property {Array.<google.protobuf.IFileDescriptorProto>|null} [file] FileDescriptorSet file
                 */
    
                /**
                 * Constructs a new FileDescriptorSet.
                 * @memberof google.protobuf
                 * @classdesc Represents a FileDescriptorSet.
                 * @implements IFileDescriptorSet
                 * @constructor
                 * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
                 */
                function FileDescriptorSet(properties) {
                    this.file = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FileDescriptorSet file.
                 * @member {Array.<google.protobuf.IFileDescriptorProto>} file
                 * @memberof google.protobuf.FileDescriptorSet
                 * @instance
                 */
                FileDescriptorSet.prototype.file = $util.emptyArray;
    
                /**
                 * Creates a new FileDescriptorSet instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set
                 * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance
                 */
                FileDescriptorSet.create = function create(properties) {
                    return new FileDescriptorSet(properties);
                };
    
                /**
                 * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileDescriptorSet.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.file != null && message.file.length)
                        for (var i = 0; i < message.file.length; ++i)
                            $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FileDescriptorSet message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileDescriptorSet.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.file && message.file.length))
                                    message.file = [];
                                message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FileDescriptorSet message.
                 * @function verify
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FileDescriptorSet.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.file != null && message.hasOwnProperty("file")) {
                        if (!Array.isArray(message.file))
                            return "file: array expected";
                        for (var i = 0; i < message.file.length; ++i) {
                            var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]);
                            if (error)
                                return "file." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet
                 */
                FileDescriptorSet.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FileDescriptorSet)
                        return object;
                    var message = new $root.google.protobuf.FileDescriptorSet();
                    if (object.file) {
                        if (!Array.isArray(object.file))
                            throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");
                        message.file = [];
                        for (var i = 0; i < object.file.length; ++i) {
                            if (typeof object.file[i] !== "object")
                                throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");
                            message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FileDescriptorSet.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.file = [];
                    if (message.file && message.file.length) {
                        object.file = [];
                        for (var j = 0; j < message.file.length; ++j)
                            object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this FileDescriptorSet to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FileDescriptorSet
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FileDescriptorSet.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FileDescriptorSet
                 * @function getTypeUrl
                 * @memberof google.protobuf.FileDescriptorSet
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FileDescriptorSet";
                };
    
                return FileDescriptorSet;
            })();
    
            /**
             * Edition enum.
             * @name google.protobuf.Edition
             * @enum {number}
             * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value
             * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value
             * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value
             * @property {number} EDITION_2023=1000 EDITION_2023 value
             * @property {number} EDITION_2024=1001 EDITION_2024 value
             * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value
             * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value
             * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value
             * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value
             * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value
             * @property {number} EDITION_MAX=2147483647 EDITION_MAX value
             */
            protobuf.Edition = (function() {
                var valuesById = {}, values = Object.create(valuesById);
                values[valuesById[0] = "EDITION_UNKNOWN"] = 0;
                values[valuesById[998] = "EDITION_PROTO2"] = 998;
                values[valuesById[999] = "EDITION_PROTO3"] = 999;
                values[valuesById[1000] = "EDITION_2023"] = 1000;
                values[valuesById[1001] = "EDITION_2024"] = 1001;
                values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1;
                values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2;
                values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997;
                values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998;
                values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999;
                values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647;
                return values;
            })();
    
            protobuf.FileDescriptorProto = (function() {
    
                /**
                 * Properties of a FileDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IFileDescriptorProto
                 * @property {string|null} [name] FileDescriptorProto name
                 * @property {string|null} ["package"] FileDescriptorProto package
                 * @property {Array.<string>|null} [dependency] FileDescriptorProto dependency
                 * @property {Array.<number>|null} [publicDependency] FileDescriptorProto publicDependency
                 * @property {Array.<number>|null} [weakDependency] FileDescriptorProto weakDependency
                 * @property {Array.<google.protobuf.IDescriptorProto>|null} [messageType] FileDescriptorProto messageType
                 * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] FileDescriptorProto enumType
                 * @property {Array.<google.protobuf.IServiceDescriptorProto>|null} [service] FileDescriptorProto service
                 * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] FileDescriptorProto extension
                 * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options
                 * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo
                 * @property {string|null} [syntax] FileDescriptorProto syntax
                 * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition
                 */
    
                /**
                 * Constructs a new FileDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents a FileDescriptorProto.
                 * @implements IFileDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
                 */
                function FileDescriptorProto(properties) {
                    this.dependency = [];
                    this.publicDependency = [];
                    this.weakDependency = [];
                    this.messageType = [];
                    this.enumType = [];
                    this.service = [];
                    this.extension = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FileDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.name = "";
    
                /**
                 * FileDescriptorProto package.
                 * @member {string} package
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype["package"] = "";
    
                /**
                 * FileDescriptorProto dependency.
                 * @member {Array.<string>} dependency
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.dependency = $util.emptyArray;
    
                /**
                 * FileDescriptorProto publicDependency.
                 * @member {Array.<number>} publicDependency
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.publicDependency = $util.emptyArray;
    
                /**
                 * FileDescriptorProto weakDependency.
                 * @member {Array.<number>} weakDependency
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.weakDependency = $util.emptyArray;
    
                /**
                 * FileDescriptorProto messageType.
                 * @member {Array.<google.protobuf.IDescriptorProto>} messageType
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.messageType = $util.emptyArray;
    
                /**
                 * FileDescriptorProto enumType.
                 * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.enumType = $util.emptyArray;
    
                /**
                 * FileDescriptorProto service.
                 * @member {Array.<google.protobuf.IServiceDescriptorProto>} service
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.service = $util.emptyArray;
    
                /**
                 * FileDescriptorProto extension.
                 * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.extension = $util.emptyArray;
    
                /**
                 * FileDescriptorProto options.
                 * @member {google.protobuf.IFileOptions|null|undefined} options
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.options = null;
    
                /**
                 * FileDescriptorProto sourceCodeInfo.
                 * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.sourceCodeInfo = null;
    
                /**
                 * FileDescriptorProto syntax.
                 * @member {string} syntax
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.syntax = "";
    
                /**
                 * FileDescriptorProto edition.
                 * @member {google.protobuf.Edition} edition
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 */
                FileDescriptorProto.prototype.edition = 0;
    
                /**
                 * Creates a new FileDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance
                 */
                FileDescriptorProto.create = function create(properties) {
                    return new FileDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message["package"] != null && Object.hasOwnProperty.call(message, "package"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]);
                    if (message.dependency != null && message.dependency.length)
                        for (var i = 0; i < message.dependency.length; ++i)
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]);
                    if (message.messageType != null && message.messageType.length)
                        for (var i = 0; i < message.messageType.length; ++i)
                            $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.enumType != null && message.enumType.length)
                        for (var i = 0; i < message.enumType.length; ++i)
                            $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.service != null && message.service.length)
                        for (var i = 0; i < message.service.length; ++i)
                            $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                    if (message.extension != null && message.extension.length)
                        for (var i = 0; i < message.extension.length; ++i)
                            $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo"))
                        $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                    if (message.publicDependency != null && message.publicDependency.length)
                        for (var i = 0; i < message.publicDependency.length; ++i)
                            writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]);
                    if (message.weakDependency != null && message.weakDependency.length)
                        for (var i = 0; i < message.weakDependency.length; ++i)
                            writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]);
                    if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax"))
                        writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax);
                    if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
                        writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition);
                    return writer;
                };
    
                /**
                 * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FileDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message["package"] = reader.string();
                                break;
                            }
                        case 3: {
                                if (!(message.dependency && message.dependency.length))
                                    message.dependency = [];
                                message.dependency.push(reader.string());
                                break;
                            }
                        case 10: {
                                if (!(message.publicDependency && message.publicDependency.length))
                                    message.publicDependency = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message.publicDependency.push(reader.int32());
                                } else
                                    message.publicDependency.push(reader.int32());
                                break;
                            }
                        case 11: {
                                if (!(message.weakDependency && message.weakDependency.length))
                                    message.weakDependency = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message.weakDependency.push(reader.int32());
                                } else
                                    message.weakDependency.push(reader.int32());
                                break;
                            }
                        case 4: {
                                if (!(message.messageType && message.messageType.length))
                                    message.messageType = [];
                                message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 5: {
                                if (!(message.enumType && message.enumType.length))
                                    message.enumType = [];
                                message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 6: {
                                if (!(message.service && message.service.length))
                                    message.service = [];
                                message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 7: {
                                if (!(message.extension && message.extension.length))
                                    message.extension = [];
                                message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 8: {
                                message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32());
                                break;
                            }
                        case 9: {
                                message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32());
                                break;
                            }
                        case 12: {
                                message.syntax = reader.string();
                                break;
                            }
                        case 14: {
                                message.edition = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FileDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FileDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message["package"] != null && message.hasOwnProperty("package"))
                        if (!$util.isString(message["package"]))
                            return "package: string expected";
                    if (message.dependency != null && message.hasOwnProperty("dependency")) {
                        if (!Array.isArray(message.dependency))
                            return "dependency: array expected";
                        for (var i = 0; i < message.dependency.length; ++i)
                            if (!$util.isString(message.dependency[i]))
                                return "dependency: string[] expected";
                    }
                    if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) {
                        if (!Array.isArray(message.publicDependency))
                            return "publicDependency: array expected";
                        for (var i = 0; i < message.publicDependency.length; ++i)
                            if (!$util.isInteger(message.publicDependency[i]))
                                return "publicDependency: integer[] expected";
                    }
                    if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) {
                        if (!Array.isArray(message.weakDependency))
                            return "weakDependency: array expected";
                        for (var i = 0; i < message.weakDependency.length; ++i)
                            if (!$util.isInteger(message.weakDependency[i]))
                                return "weakDependency: integer[] expected";
                    }
                    if (message.messageType != null && message.hasOwnProperty("messageType")) {
                        if (!Array.isArray(message.messageType))
                            return "messageType: array expected";
                        for (var i = 0; i < message.messageType.length; ++i) {
                            var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]);
                            if (error)
                                return "messageType." + error;
                        }
                    }
                    if (message.enumType != null && message.hasOwnProperty("enumType")) {
                        if (!Array.isArray(message.enumType))
                            return "enumType: array expected";
                        for (var i = 0; i < message.enumType.length; ++i) {
                            var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
                            if (error)
                                return "enumType." + error;
                        }
                    }
                    if (message.service != null && message.hasOwnProperty("service")) {
                        if (!Array.isArray(message.service))
                            return "service: array expected";
                        for (var i = 0; i < message.service.length; ++i) {
                            var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]);
                            if (error)
                                return "service." + error;
                        }
                    }
                    if (message.extension != null && message.hasOwnProperty("extension")) {
                        if (!Array.isArray(message.extension))
                            return "extension: array expected";
                        for (var i = 0; i < message.extension.length; ++i) {
                            var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
                            if (error)
                                return "extension." + error;
                        }
                    }
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.FileOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) {
                        var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo);
                        if (error)
                            return "sourceCodeInfo." + error;
                    }
                    if (message.syntax != null && message.hasOwnProperty("syntax"))
                        if (!$util.isString(message.syntax))
                            return "syntax: string expected";
                    if (message.edition != null && message.hasOwnProperty("edition"))
                        switch (message.edition) {
                        default:
                            return "edition: enum value expected";
                        case 0:
                        case 998:
                        case 999:
                        case 1000:
                        case 1001:
                        case 1:
                        case 2:
                        case 99997:
                        case 99998:
                        case 99999:
                        case 2147483647:
                            break;
                        }
                    return null;
                };
    
                /**
                 * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto
                 */
                FileDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FileDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.FileDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object["package"] != null)
                        message["package"] = String(object["package"]);
                    if (object.dependency) {
                        if (!Array.isArray(object.dependency))
                            throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");
                        message.dependency = [];
                        for (var i = 0; i < object.dependency.length; ++i)
                            message.dependency[i] = String(object.dependency[i]);
                    }
                    if (object.publicDependency) {
                        if (!Array.isArray(object.publicDependency))
                            throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");
                        message.publicDependency = [];
                        for (var i = 0; i < object.publicDependency.length; ++i)
                            message.publicDependency[i] = object.publicDependency[i] | 0;
                    }
                    if (object.weakDependency) {
                        if (!Array.isArray(object.weakDependency))
                            throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");
                        message.weakDependency = [];
                        for (var i = 0; i < object.weakDependency.length; ++i)
                            message.weakDependency[i] = object.weakDependency[i] | 0;
                    }
                    if (object.messageType) {
                        if (!Array.isArray(object.messageType))
                            throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");
                        message.messageType = [];
                        for (var i = 0; i < object.messageType.length; ++i) {
                            if (typeof object.messageType[i] !== "object")
                                throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");
                            message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]);
                        }
                    }
                    if (object.enumType) {
                        if (!Array.isArray(object.enumType))
                            throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");
                        message.enumType = [];
                        for (var i = 0; i < object.enumType.length; ++i) {
                            if (typeof object.enumType[i] !== "object")
                                throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");
                            message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
                        }
                    }
                    if (object.service) {
                        if (!Array.isArray(object.service))
                            throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");
                        message.service = [];
                        for (var i = 0; i < object.service.length; ++i) {
                            if (typeof object.service[i] !== "object")
                                throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");
                            message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]);
                        }
                    }
                    if (object.extension) {
                        if (!Array.isArray(object.extension))
                            throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");
                        message.extension = [];
                        for (var i = 0; i < object.extension.length; ++i) {
                            if (typeof object.extension[i] !== "object")
                                throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");
                            message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
                        }
                    }
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.FileOptions.fromObject(object.options);
                    }
                    if (object.sourceCodeInfo != null) {
                        if (typeof object.sourceCodeInfo !== "object")
                            throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");
                        message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo);
                    }
                    if (object.syntax != null)
                        message.syntax = String(object.syntax);
                    switch (object.edition) {
                    default:
                        if (typeof object.edition === "number") {
                            message.edition = object.edition;
                            break;
                        }
                        break;
                    case "EDITION_UNKNOWN":
                    case 0:
                        message.edition = 0;
                        break;
                    case "EDITION_PROTO2":
                    case 998:
                        message.edition = 998;
                        break;
                    case "EDITION_PROTO3":
                    case 999:
                        message.edition = 999;
                        break;
                    case "EDITION_2023":
                    case 1000:
                        message.edition = 1000;
                        break;
                    case "EDITION_2024":
                    case 1001:
                        message.edition = 1001;
                        break;
                    case "EDITION_1_TEST_ONLY":
                    case 1:
                        message.edition = 1;
                        break;
                    case "EDITION_2_TEST_ONLY":
                    case 2:
                        message.edition = 2;
                        break;
                    case "EDITION_99997_TEST_ONLY":
                    case 99997:
                        message.edition = 99997;
                        break;
                    case "EDITION_99998_TEST_ONLY":
                    case 99998:
                        message.edition = 99998;
                        break;
                    case "EDITION_99999_TEST_ONLY":
                    case 99999:
                        message.edition = 99999;
                        break;
                    case "EDITION_MAX":
                    case 2147483647:
                        message.edition = 2147483647;
                        break;
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FileDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.dependency = [];
                        object.messageType = [];
                        object.enumType = [];
                        object.service = [];
                        object.extension = [];
                        object.publicDependency = [];
                        object.weakDependency = [];
                    }
                    if (options.defaults) {
                        object.name = "";
                        object["package"] = "";
                        object.options = null;
                        object.sourceCodeInfo = null;
                        object.syntax = "";
                        object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message["package"] != null && message.hasOwnProperty("package"))
                        object["package"] = message["package"];
                    if (message.dependency && message.dependency.length) {
                        object.dependency = [];
                        for (var j = 0; j < message.dependency.length; ++j)
                            object.dependency[j] = message.dependency[j];
                    }
                    if (message.messageType && message.messageType.length) {
                        object.messageType = [];
                        for (var j = 0; j < message.messageType.length; ++j)
                            object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options);
                    }
                    if (message.enumType && message.enumType.length) {
                        object.enumType = [];
                        for (var j = 0; j < message.enumType.length; ++j)
                            object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
                    }
                    if (message.service && message.service.length) {
                        object.service = [];
                        for (var j = 0; j < message.service.length; ++j)
                            object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options);
                    }
                    if (message.extension && message.extension.length) {
                        object.extension = [];
                        for (var j = 0; j < message.extension.length; ++j)
                            object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
                    }
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.FileOptions.toObject(message.options, options);
                    if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo"))
                        object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options);
                    if (message.publicDependency && message.publicDependency.length) {
                        object.publicDependency = [];
                        for (var j = 0; j < message.publicDependency.length; ++j)
                            object.publicDependency[j] = message.publicDependency[j];
                    }
                    if (message.weakDependency && message.weakDependency.length) {
                        object.weakDependency = [];
                        for (var j = 0; j < message.weakDependency.length; ++j)
                            object.weakDependency[j] = message.weakDependency[j];
                    }
                    if (message.syntax != null && message.hasOwnProperty("syntax"))
                        object.syntax = message.syntax;
                    if (message.edition != null && message.hasOwnProperty("edition"))
                        object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition;
                    return object;
                };
    
                /**
                 * Converts this FileDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FileDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FileDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FileDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.FileDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FileDescriptorProto";
                };
    
                return FileDescriptorProto;
            })();
    
            protobuf.DescriptorProto = (function() {
    
                /**
                 * Properties of a DescriptorProto.
                 * @memberof google.protobuf
                 * @interface IDescriptorProto
                 * @property {string|null} [name] DescriptorProto name
                 * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [field] DescriptorProto field
                 * @property {Array.<google.protobuf.IFieldDescriptorProto>|null} [extension] DescriptorProto extension
                 * @property {Array.<google.protobuf.IDescriptorProto>|null} [nestedType] DescriptorProto nestedType
                 * @property {Array.<google.protobuf.IEnumDescriptorProto>|null} [enumType] DescriptorProto enumType
                 * @property {Array.<google.protobuf.DescriptorProto.IExtensionRange>|null} [extensionRange] DescriptorProto extensionRange
                 * @property {Array.<google.protobuf.IOneofDescriptorProto>|null} [oneofDecl] DescriptorProto oneofDecl
                 * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options
                 * @property {Array.<google.protobuf.DescriptorProto.IReservedRange>|null} [reservedRange] DescriptorProto reservedRange
                 * @property {Array.<string>|null} [reservedName] DescriptorProto reservedName
                 */
    
                /**
                 * Constructs a new DescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents a DescriptorProto.
                 * @implements IDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
                 */
                function DescriptorProto(properties) {
                    this.field = [];
                    this.extension = [];
                    this.nestedType = [];
                    this.enumType = [];
                    this.extensionRange = [];
                    this.oneofDecl = [];
                    this.reservedRange = [];
                    this.reservedName = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * DescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.name = "";
    
                /**
                 * DescriptorProto field.
                 * @member {Array.<google.protobuf.IFieldDescriptorProto>} field
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.field = $util.emptyArray;
    
                /**
                 * DescriptorProto extension.
                 * @member {Array.<google.protobuf.IFieldDescriptorProto>} extension
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.extension = $util.emptyArray;
    
                /**
                 * DescriptorProto nestedType.
                 * @member {Array.<google.protobuf.IDescriptorProto>} nestedType
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.nestedType = $util.emptyArray;
    
                /**
                 * DescriptorProto enumType.
                 * @member {Array.<google.protobuf.IEnumDescriptorProto>} enumType
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.enumType = $util.emptyArray;
    
                /**
                 * DescriptorProto extensionRange.
                 * @member {Array.<google.protobuf.DescriptorProto.IExtensionRange>} extensionRange
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.extensionRange = $util.emptyArray;
    
                /**
                 * DescriptorProto oneofDecl.
                 * @member {Array.<google.protobuf.IOneofDescriptorProto>} oneofDecl
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.oneofDecl = $util.emptyArray;
    
                /**
                 * DescriptorProto options.
                 * @member {google.protobuf.IMessageOptions|null|undefined} options
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.options = null;
    
                /**
                 * DescriptorProto reservedRange.
                 * @member {Array.<google.protobuf.DescriptorProto.IReservedRange>} reservedRange
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.reservedRange = $util.emptyArray;
    
                /**
                 * DescriptorProto reservedName.
                 * @member {Array.<string>} reservedName
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 */
                DescriptorProto.prototype.reservedName = $util.emptyArray;
    
                /**
                 * Creates a new DescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.DescriptorProto} DescriptorProto instance
                 */
                DescriptorProto.create = function create(properties) {
                    return new DescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.field != null && message.field.length)
                        for (var i = 0; i < message.field.length; ++i)
                            $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.nestedType != null && message.nestedType.length)
                        for (var i = 0; i < message.nestedType.length; ++i)
                            $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.enumType != null && message.enumType.length)
                        for (var i = 0; i < message.enumType.length; ++i)
                            $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.extensionRange != null && message.extensionRange.length)
                        for (var i = 0; i < message.extensionRange.length; ++i)
                            $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    if (message.extension != null && message.extension.length)
                        for (var i = 0; i < message.extension.length; ++i)
                            $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.oneofDecl != null && message.oneofDecl.length)
                        for (var i = 0; i < message.oneofDecl.length; ++i)
                            $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.reservedRange != null && message.reservedRange.length)
                        for (var i = 0; i < message.reservedRange.length; ++i)
                            $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim();
                    if (message.reservedName != null && message.reservedName.length)
                        for (var i = 0; i < message.reservedName.length; ++i)
                            writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]);
                    return writer;
                };
    
                /**
                 * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a DescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.DescriptorProto} DescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.field && message.field.length))
                                    message.field = [];
                                message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 6: {
                                if (!(message.extension && message.extension.length))
                                    message.extension = [];
                                message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 3: {
                                if (!(message.nestedType && message.nestedType.length))
                                    message.nestedType = [];
                                message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 4: {
                                if (!(message.enumType && message.enumType.length))
                                    message.enumType = [];
                                message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 5: {
                                if (!(message.extensionRange && message.extensionRange.length))
                                    message.extensionRange = [];
                                message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32()));
                                break;
                            }
                        case 8: {
                                if (!(message.oneofDecl && message.oneofDecl.length))
                                    message.oneofDecl = [];
                                message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 7: {
                                message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32());
                                break;
                            }
                        case 9: {
                                if (!(message.reservedRange && message.reservedRange.length))
                                    message.reservedRange = [];
                                message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32()));
                                break;
                            }
                        case 10: {
                                if (!(message.reservedName && message.reservedName.length))
                                    message.reservedName = [];
                                message.reservedName.push(reader.string());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a DescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.DescriptorProto} DescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a DescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.field != null && message.hasOwnProperty("field")) {
                        if (!Array.isArray(message.field))
                            return "field: array expected";
                        for (var i = 0; i < message.field.length; ++i) {
                            var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]);
                            if (error)
                                return "field." + error;
                        }
                    }
                    if (message.extension != null && message.hasOwnProperty("extension")) {
                        if (!Array.isArray(message.extension))
                            return "extension: array expected";
                        for (var i = 0; i < message.extension.length; ++i) {
                            var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]);
                            if (error)
                                return "extension." + error;
                        }
                    }
                    if (message.nestedType != null && message.hasOwnProperty("nestedType")) {
                        if (!Array.isArray(message.nestedType))
                            return "nestedType: array expected";
                        for (var i = 0; i < message.nestedType.length; ++i) {
                            var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]);
                            if (error)
                                return "nestedType." + error;
                        }
                    }
                    if (message.enumType != null && message.hasOwnProperty("enumType")) {
                        if (!Array.isArray(message.enumType))
                            return "enumType: array expected";
                        for (var i = 0; i < message.enumType.length; ++i) {
                            var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]);
                            if (error)
                                return "enumType." + error;
                        }
                    }
                    if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) {
                        if (!Array.isArray(message.extensionRange))
                            return "extensionRange: array expected";
                        for (var i = 0; i < message.extensionRange.length; ++i) {
                            var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]);
                            if (error)
                                return "extensionRange." + error;
                        }
                    }
                    if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) {
                        if (!Array.isArray(message.oneofDecl))
                            return "oneofDecl: array expected";
                        for (var i = 0; i < message.oneofDecl.length; ++i) {
                            var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]);
                            if (error)
                                return "oneofDecl." + error;
                        }
                    }
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.MessageOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
                        if (!Array.isArray(message.reservedRange))
                            return "reservedRange: array expected";
                        for (var i = 0; i < message.reservedRange.length; ++i) {
                            var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]);
                            if (error)
                                return "reservedRange." + error;
                        }
                    }
                    if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
                        if (!Array.isArray(message.reservedName))
                            return "reservedName: array expected";
                        for (var i = 0; i < message.reservedName.length; ++i)
                            if (!$util.isString(message.reservedName[i]))
                                return "reservedName: string[] expected";
                    }
                    return null;
                };
    
                /**
                 * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.DescriptorProto} DescriptorProto
                 */
                DescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.DescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.DescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.field) {
                        if (!Array.isArray(object.field))
                            throw TypeError(".google.protobuf.DescriptorProto.field: array expected");
                        message.field = [];
                        for (var i = 0; i < object.field.length; ++i) {
                            if (typeof object.field[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.field: object expected");
                            message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]);
                        }
                    }
                    if (object.extension) {
                        if (!Array.isArray(object.extension))
                            throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");
                        message.extension = [];
                        for (var i = 0; i < object.extension.length; ++i) {
                            if (typeof object.extension[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");
                            message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]);
                        }
                    }
                    if (object.nestedType) {
                        if (!Array.isArray(object.nestedType))
                            throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");
                        message.nestedType = [];
                        for (var i = 0; i < object.nestedType.length; ++i) {
                            if (typeof object.nestedType[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");
                            message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]);
                        }
                    }
                    if (object.enumType) {
                        if (!Array.isArray(object.enumType))
                            throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");
                        message.enumType = [];
                        for (var i = 0; i < object.enumType.length; ++i) {
                            if (typeof object.enumType[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");
                            message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]);
                        }
                    }
                    if (object.extensionRange) {
                        if (!Array.isArray(object.extensionRange))
                            throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");
                        message.extensionRange = [];
                        for (var i = 0; i < object.extensionRange.length; ++i) {
                            if (typeof object.extensionRange[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");
                            message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]);
                        }
                    }
                    if (object.oneofDecl) {
                        if (!Array.isArray(object.oneofDecl))
                            throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");
                        message.oneofDecl = [];
                        for (var i = 0; i < object.oneofDecl.length; ++i) {
                            if (typeof object.oneofDecl[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");
                            message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]);
                        }
                    }
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.DescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.MessageOptions.fromObject(object.options);
                    }
                    if (object.reservedRange) {
                        if (!Array.isArray(object.reservedRange))
                            throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");
                        message.reservedRange = [];
                        for (var i = 0; i < object.reservedRange.length; ++i) {
                            if (typeof object.reservedRange[i] !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");
                            message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]);
                        }
                    }
                    if (object.reservedName) {
                        if (!Array.isArray(object.reservedName))
                            throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");
                        message.reservedName = [];
                        for (var i = 0; i < object.reservedName.length; ++i)
                            message.reservedName[i] = String(object.reservedName[i]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {google.protobuf.DescriptorProto} message DescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.field = [];
                        object.nestedType = [];
                        object.enumType = [];
                        object.extensionRange = [];
                        object.extension = [];
                        object.oneofDecl = [];
                        object.reservedRange = [];
                        object.reservedName = [];
                    }
                    if (options.defaults) {
                        object.name = "";
                        object.options = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.field && message.field.length) {
                        object.field = [];
                        for (var j = 0; j < message.field.length; ++j)
                            object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options);
                    }
                    if (message.nestedType && message.nestedType.length) {
                        object.nestedType = [];
                        for (var j = 0; j < message.nestedType.length; ++j)
                            object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options);
                    }
                    if (message.enumType && message.enumType.length) {
                        object.enumType = [];
                        for (var j = 0; j < message.enumType.length; ++j)
                            object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options);
                    }
                    if (message.extensionRange && message.extensionRange.length) {
                        object.extensionRange = [];
                        for (var j = 0; j < message.extensionRange.length; ++j)
                            object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options);
                    }
                    if (message.extension && message.extension.length) {
                        object.extension = [];
                        for (var j = 0; j < message.extension.length; ++j)
                            object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options);
                    }
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options);
                    if (message.oneofDecl && message.oneofDecl.length) {
                        object.oneofDecl = [];
                        for (var j = 0; j < message.oneofDecl.length; ++j)
                            object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options);
                    }
                    if (message.reservedRange && message.reservedRange.length) {
                        object.reservedRange = [];
                        for (var j = 0; j < message.reservedRange.length; ++j)
                            object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options);
                    }
                    if (message.reservedName && message.reservedName.length) {
                        object.reservedName = [];
                        for (var j = 0; j < message.reservedName.length; ++j)
                            object.reservedName[j] = message.reservedName[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this DescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.DescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for DescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.DescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.DescriptorProto";
                };
    
                DescriptorProto.ExtensionRange = (function() {
    
                    /**
                     * Properties of an ExtensionRange.
                     * @memberof google.protobuf.DescriptorProto
                     * @interface IExtensionRange
                     * @property {number|null} [start] ExtensionRange start
                     * @property {number|null} [end] ExtensionRange end
                     * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options
                     */
    
                    /**
                     * Constructs a new ExtensionRange.
                     * @memberof google.protobuf.DescriptorProto
                     * @classdesc Represents an ExtensionRange.
                     * @implements IExtensionRange
                     * @constructor
                     * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
                     */
                    function ExtensionRange(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * ExtensionRange start.
                     * @member {number} start
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @instance
                     */
                    ExtensionRange.prototype.start = 0;
    
                    /**
                     * ExtensionRange end.
                     * @member {number} end
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @instance
                     */
                    ExtensionRange.prototype.end = 0;
    
                    /**
                     * ExtensionRange options.
                     * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @instance
                     */
                    ExtensionRange.prototype.options = null;
    
                    /**
                     * Creates a new ExtensionRange instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set
                     * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance
                     */
                    ExtensionRange.create = function create(properties) {
                        return new ExtensionRange(properties);
                    };
    
                    /**
                     * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ExtensionRange.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.start != null && Object.hasOwnProperty.call(message, "start"))
                            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
                        if (message.end != null && Object.hasOwnProperty.call(message, "end"))
                            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
                        if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                            $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                        return writer;
                    };
    
                    /**
                     * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes an ExtensionRange message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ExtensionRange.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.start = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.end = reader.int32();
                                    break;
                                }
                            case 3: {
                                    message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes an ExtensionRange message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ExtensionRange.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies an ExtensionRange message.
                     * @function verify
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    ExtensionRange.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.start != null && message.hasOwnProperty("start"))
                            if (!$util.isInteger(message.start))
                                return "start: integer expected";
                        if (message.end != null && message.hasOwnProperty("end"))
                            if (!$util.isInteger(message.end))
                                return "end: integer expected";
                        if (message.options != null && message.hasOwnProperty("options")) {
                            var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options);
                            if (error)
                                return "options." + error;
                        }
                        return null;
                    };
    
                    /**
                     * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange
                     */
                    ExtensionRange.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange)
                            return object;
                        var message = new $root.google.protobuf.DescriptorProto.ExtensionRange();
                        if (object.start != null)
                            message.start = object.start | 0;
                        if (object.end != null)
                            message.end = object.end | 0;
                        if (object.options != null) {
                            if (typeof object.options !== "object")
                                throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");
                            message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options);
                        }
                        return message;
                    };
    
                    /**
                     * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    ExtensionRange.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.start = 0;
                            object.end = 0;
                            object.options = null;
                        }
                        if (message.start != null && message.hasOwnProperty("start"))
                            object.start = message.start;
                        if (message.end != null && message.hasOwnProperty("end"))
                            object.end = message.end;
                        if (message.options != null && message.hasOwnProperty("options"))
                            object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options);
                        return object;
                    };
    
                    /**
                     * Converts this ExtensionRange to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    ExtensionRange.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for ExtensionRange
                     * @function getTypeUrl
                     * @memberof google.protobuf.DescriptorProto.ExtensionRange
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange";
                    };
    
                    return ExtensionRange;
                })();
    
                DescriptorProto.ReservedRange = (function() {
    
                    /**
                     * Properties of a ReservedRange.
                     * @memberof google.protobuf.DescriptorProto
                     * @interface IReservedRange
                     * @property {number|null} [start] ReservedRange start
                     * @property {number|null} [end] ReservedRange end
                     */
    
                    /**
                     * Constructs a new ReservedRange.
                     * @memberof google.protobuf.DescriptorProto
                     * @classdesc Represents a ReservedRange.
                     * @implements IReservedRange
                     * @constructor
                     * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
                     */
                    function ReservedRange(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * ReservedRange start.
                     * @member {number} start
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @instance
                     */
                    ReservedRange.prototype.start = 0;
    
                    /**
                     * ReservedRange end.
                     * @member {number} end
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @instance
                     */
                    ReservedRange.prototype.end = 0;
    
                    /**
                     * Creates a new ReservedRange instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set
                     * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance
                     */
                    ReservedRange.create = function create(properties) {
                        return new ReservedRange(properties);
                    };
    
                    /**
                     * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ReservedRange.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.start != null && Object.hasOwnProperty.call(message, "start"))
                            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
                        if (message.end != null && Object.hasOwnProperty.call(message, "end"))
                            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    ReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a ReservedRange message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ReservedRange.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.start = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.end = reader.int32();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes a ReservedRange message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    ReservedRange.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a ReservedRange message.
                     * @function verify
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    ReservedRange.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.start != null && message.hasOwnProperty("start"))
                            if (!$util.isInteger(message.start))
                                return "start: integer expected";
                        if (message.end != null && message.hasOwnProperty("end"))
                            if (!$util.isInteger(message.end))
                                return "end: integer expected";
                        return null;
                    };
    
                    /**
                     * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange
                     */
                    ReservedRange.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange)
                            return object;
                        var message = new $root.google.protobuf.DescriptorProto.ReservedRange();
                        if (object.start != null)
                            message.start = object.start | 0;
                        if (object.end != null)
                            message.end = object.end | 0;
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a ReservedRange message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    ReservedRange.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.start = 0;
                            object.end = 0;
                        }
                        if (message.start != null && message.hasOwnProperty("start"))
                            object.start = message.start;
                        if (message.end != null && message.hasOwnProperty("end"))
                            object.end = message.end;
                        return object;
                    };
    
                    /**
                     * Converts this ReservedRange to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    ReservedRange.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for ReservedRange
                     * @function getTypeUrl
                     * @memberof google.protobuf.DescriptorProto.ReservedRange
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange";
                    };
    
                    return ReservedRange;
                })();
    
                return DescriptorProto;
            })();
    
            protobuf.ExtensionRangeOptions = (function() {
    
                /**
                 * Properties of an ExtensionRangeOptions.
                 * @memberof google.protobuf
                 * @interface IExtensionRangeOptions
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption
                 * @property {Array.<google.protobuf.ExtensionRangeOptions.IDeclaration>|null} [declaration] ExtensionRangeOptions declaration
                 * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features
                 * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification
                 */
    
                /**
                 * Constructs a new ExtensionRangeOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents an ExtensionRangeOptions.
                 * @implements IExtensionRangeOptions
                 * @constructor
                 * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
                 */
                function ExtensionRangeOptions(properties) {
                    this.uninterpretedOption = [];
                    this.declaration = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ExtensionRangeOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @instance
                 */
                ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * ExtensionRangeOptions declaration.
                 * @member {Array.<google.protobuf.ExtensionRangeOptions.IDeclaration>} declaration
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @instance
                 */
                ExtensionRangeOptions.prototype.declaration = $util.emptyArray;
    
                /**
                 * ExtensionRangeOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @instance
                 */
                ExtensionRangeOptions.prototype.features = null;
    
                /**
                 * ExtensionRangeOptions verification.
                 * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @instance
                 */
                ExtensionRangeOptions.prototype.verification = 1;
    
                /**
                 * Creates a new ExtensionRangeOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set
                 * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance
                 */
                ExtensionRangeOptions.create = function create(properties) {
                    return new ExtensionRangeOptions(properties);
                };
    
                /**
                 * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExtensionRangeOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.declaration != null && message.declaration.length)
                        for (var i = 0; i < message.declaration.length; ++i)
                            $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.verification != null && Object.hasOwnProperty.call(message, "verification"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an ExtensionRangeOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExtensionRangeOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                if (!(message.declaration && message.declaration.length))
                                    message.declaration = [];
                                message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32()));
                                break;
                            }
                        case 50: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.verification = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an ExtensionRangeOptions message.
                 * @function verify
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ExtensionRangeOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message.declaration != null && message.hasOwnProperty("declaration")) {
                        if (!Array.isArray(message.declaration))
                            return "declaration: array expected";
                        for (var i = 0; i < message.declaration.length; ++i) {
                            var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]);
                            if (error)
                                return "declaration." + error;
                        }
                    }
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.verification != null && message.hasOwnProperty("verification"))
                        switch (message.verification) {
                        default:
                            return "verification: enum value expected";
                        case 0:
                        case 1:
                            break;
                        }
                    return null;
                };
    
                /**
                 * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions
                 */
                ExtensionRangeOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.ExtensionRangeOptions)
                        return object;
                    var message = new $root.google.protobuf.ExtensionRangeOptions();
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object.declaration) {
                        if (!Array.isArray(object.declaration))
                            throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected");
                        message.declaration = [];
                        for (var i = 0; i < object.declaration.length; ++i) {
                            if (typeof object.declaration[i] !== "object")
                                throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected");
                            message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]);
                        }
                    }
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    switch (object.verification) {
                    case "DECLARATION":
                    case 0:
                        message.verification = 0;
                        break;
                    default:
                        if (typeof object.verification === "number") {
                            message.verification = object.verification;
                            break;
                        }
                        break;
                    case "UNVERIFIED":
                    case 1:
                        message.verification = 1;
                        break;
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ExtensionRangeOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.declaration = [];
                        object.uninterpretedOption = [];
                    }
                    if (options.defaults) {
                        object.verification = options.enums === String ? "UNVERIFIED" : 1;
                        object.features = null;
                    }
                    if (message.declaration && message.declaration.length) {
                        object.declaration = [];
                        for (var j = 0; j < message.declaration.length; ++j)
                            object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options);
                    }
                    if (message.verification != null && message.hasOwnProperty("verification"))
                        object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this ExtensionRangeOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ExtensionRangeOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ExtensionRangeOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.ExtensionRangeOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions";
                };
    
                ExtensionRangeOptions.Declaration = (function() {
    
                    /**
                     * Properties of a Declaration.
                     * @memberof google.protobuf.ExtensionRangeOptions
                     * @interface IDeclaration
                     * @property {number|null} [number] Declaration number
                     * @property {string|null} [fullName] Declaration fullName
                     * @property {string|null} [type] Declaration type
                     * @property {boolean|null} [reserved] Declaration reserved
                     * @property {boolean|null} [repeated] Declaration repeated
                     */
    
                    /**
                     * Constructs a new Declaration.
                     * @memberof google.protobuf.ExtensionRangeOptions
                     * @classdesc Represents a Declaration.
                     * @implements IDeclaration
                     * @constructor
                     * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set
                     */
                    function Declaration(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * Declaration number.
                     * @member {number} number
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     */
                    Declaration.prototype.number = 0;
    
                    /**
                     * Declaration fullName.
                     * @member {string} fullName
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     */
                    Declaration.prototype.fullName = "";
    
                    /**
                     * Declaration type.
                     * @member {string} type
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     */
                    Declaration.prototype.type = "";
    
                    /**
                     * Declaration reserved.
                     * @member {boolean} reserved
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     */
                    Declaration.prototype.reserved = false;
    
                    /**
                     * Declaration repeated.
                     * @member {boolean} repeated
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     */
                    Declaration.prototype.repeated = false;
    
                    /**
                     * Creates a new Declaration instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set
                     * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance
                     */
                    Declaration.create = function create(properties) {
                        return new Declaration(properties);
                    };
    
                    /**
                     * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Declaration.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.number != null && Object.hasOwnProperty.call(message, "number"))
                            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number);
                        if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName);
                        if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.type);
                        if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved"))
                            writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved);
                        if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated"))
                            writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Declaration.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a Declaration message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Declaration.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.number = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.fullName = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.type = reader.string();
                                    break;
                                }
                            case 5: {
                                    message.reserved = reader.bool();
                                    break;
                                }
                            case 6: {
                                    message.repeated = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes a Declaration message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Declaration.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a Declaration message.
                     * @function verify
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Declaration.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.number != null && message.hasOwnProperty("number"))
                            if (!$util.isInteger(message.number))
                                return "number: integer expected";
                        if (message.fullName != null && message.hasOwnProperty("fullName"))
                            if (!$util.isString(message.fullName))
                                return "fullName: string expected";
                        if (message.type != null && message.hasOwnProperty("type"))
                            if (!$util.isString(message.type))
                                return "type: string expected";
                        if (message.reserved != null && message.hasOwnProperty("reserved"))
                            if (typeof message.reserved !== "boolean")
                                return "reserved: boolean expected";
                        if (message.repeated != null && message.hasOwnProperty("repeated"))
                            if (typeof message.repeated !== "boolean")
                                return "repeated: boolean expected";
                        return null;
                    };
    
                    /**
                     * Creates a Declaration message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration
                     */
                    Declaration.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration)
                            return object;
                        var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration();
                        if (object.number != null)
                            message.number = object.number | 0;
                        if (object.fullName != null)
                            message.fullName = String(object.fullName);
                        if (object.type != null)
                            message.type = String(object.type);
                        if (object.reserved != null)
                            message.reserved = Boolean(object.reserved);
                        if (object.repeated != null)
                            message.repeated = Boolean(object.repeated);
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a Declaration message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Declaration.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.number = 0;
                            object.fullName = "";
                            object.type = "";
                            object.reserved = false;
                            object.repeated = false;
                        }
                        if (message.number != null && message.hasOwnProperty("number"))
                            object.number = message.number;
                        if (message.fullName != null && message.hasOwnProperty("fullName"))
                            object.fullName = message.fullName;
                        if (message.type != null && message.hasOwnProperty("type"))
                            object.type = message.type;
                        if (message.reserved != null && message.hasOwnProperty("reserved"))
                            object.reserved = message.reserved;
                        if (message.repeated != null && message.hasOwnProperty("repeated"))
                            object.repeated = message.repeated;
                        return object;
                    };
    
                    /**
                     * Converts this Declaration to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Declaration.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for Declaration
                     * @function getTypeUrl
                     * @memberof google.protobuf.ExtensionRangeOptions.Declaration
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration";
                    };
    
                    return Declaration;
                })();
    
                /**
                 * VerificationState enum.
                 * @name google.protobuf.ExtensionRangeOptions.VerificationState
                 * @enum {number}
                 * @property {number} DECLARATION=0 DECLARATION value
                 * @property {number} UNVERIFIED=1 UNVERIFIED value
                 */
                ExtensionRangeOptions.VerificationState = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "DECLARATION"] = 0;
                    values[valuesById[1] = "UNVERIFIED"] = 1;
                    return values;
                })();
    
                return ExtensionRangeOptions;
            })();
    
            protobuf.FieldDescriptorProto = (function() {
    
                /**
                 * Properties of a FieldDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IFieldDescriptorProto
                 * @property {string|null} [name] FieldDescriptorProto name
                 * @property {number|null} [number] FieldDescriptorProto number
                 * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label
                 * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type
                 * @property {string|null} [typeName] FieldDescriptorProto typeName
                 * @property {string|null} [extendee] FieldDescriptorProto extendee
                 * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue
                 * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex
                 * @property {string|null} [jsonName] FieldDescriptorProto jsonName
                 * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options
                 * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional
                 */
    
                /**
                 * Constructs a new FieldDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents a FieldDescriptorProto.
                 * @implements IFieldDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
                 */
                function FieldDescriptorProto(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FieldDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.name = "";
    
                /**
                 * FieldDescriptorProto number.
                 * @member {number} number
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.number = 0;
    
                /**
                 * FieldDescriptorProto label.
                 * @member {google.protobuf.FieldDescriptorProto.Label} label
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.label = 1;
    
                /**
                 * FieldDescriptorProto type.
                 * @member {google.protobuf.FieldDescriptorProto.Type} type
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.type = 1;
    
                /**
                 * FieldDescriptorProto typeName.
                 * @member {string} typeName
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.typeName = "";
    
                /**
                 * FieldDescriptorProto extendee.
                 * @member {string} extendee
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.extendee = "";
    
                /**
                 * FieldDescriptorProto defaultValue.
                 * @member {string} defaultValue
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.defaultValue = "";
    
                /**
                 * FieldDescriptorProto oneofIndex.
                 * @member {number} oneofIndex
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.oneofIndex = 0;
    
                /**
                 * FieldDescriptorProto jsonName.
                 * @member {string} jsonName
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.jsonName = "";
    
                /**
                 * FieldDescriptorProto options.
                 * @member {google.protobuf.IFieldOptions|null|undefined} options
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.options = null;
    
                /**
                 * FieldDescriptorProto proto3Optional.
                 * @member {boolean} proto3Optional
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 */
                FieldDescriptorProto.prototype.proto3Optional = false;
    
                /**
                 * Creates a new FieldDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance
                 */
                FieldDescriptorProto.create = function create(properties) {
                    return new FieldDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee);
                    if (message.number != null && Object.hasOwnProperty.call(message, "number"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number);
                    if (message.label != null && Object.hasOwnProperty.call(message, "label"))
                        writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label);
                    if (message.type != null && Object.hasOwnProperty.call(message, "type"))
                        writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type);
                    if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName"))
                        writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName);
                    if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue"))
                        writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue);
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim();
                    if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex"))
                        writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex);
                    if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName"))
                        writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName);
                    if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional"))
                        writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional);
                    return writer;
                };
    
                /**
                 * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FieldDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 3: {
                                message.number = reader.int32();
                                break;
                            }
                        case 4: {
                                message.label = reader.int32();
                                break;
                            }
                        case 5: {
                                message.type = reader.int32();
                                break;
                            }
                        case 6: {
                                message.typeName = reader.string();
                                break;
                            }
                        case 2: {
                                message.extendee = reader.string();
                                break;
                            }
                        case 7: {
                                message.defaultValue = reader.string();
                                break;
                            }
                        case 9: {
                                message.oneofIndex = reader.int32();
                                break;
                            }
                        case 10: {
                                message.jsonName = reader.string();
                                break;
                            }
                        case 8: {
                                message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32());
                                break;
                            }
                        case 17: {
                                message.proto3Optional = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FieldDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FieldDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.number != null && message.hasOwnProperty("number"))
                        if (!$util.isInteger(message.number))
                            return "number: integer expected";
                    if (message.label != null && message.hasOwnProperty("label"))
                        switch (message.label) {
                        default:
                            return "label: enum value expected";
                        case 1:
                        case 3:
                        case 2:
                            break;
                        }
                    if (message.type != null && message.hasOwnProperty("type"))
                        switch (message.type) {
                        default:
                            return "type: enum value expected";
                        case 1:
                        case 2:
                        case 3:
                        case 4:
                        case 5:
                        case 6:
                        case 7:
                        case 8:
                        case 9:
                        case 10:
                        case 11:
                        case 12:
                        case 13:
                        case 14:
                        case 15:
                        case 16:
                        case 17:
                        case 18:
                            break;
                        }
                    if (message.typeName != null && message.hasOwnProperty("typeName"))
                        if (!$util.isString(message.typeName))
                            return "typeName: string expected";
                    if (message.extendee != null && message.hasOwnProperty("extendee"))
                        if (!$util.isString(message.extendee))
                            return "extendee: string expected";
                    if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
                        if (!$util.isString(message.defaultValue))
                            return "defaultValue: string expected";
                    if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
                        if (!$util.isInteger(message.oneofIndex))
                            return "oneofIndex: integer expected";
                    if (message.jsonName != null && message.hasOwnProperty("jsonName"))
                        if (!$util.isString(message.jsonName))
                            return "jsonName: string expected";
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.FieldOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
                        if (typeof message.proto3Optional !== "boolean")
                            return "proto3Optional: boolean expected";
                    return null;
                };
    
                /**
                 * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto
                 */
                FieldDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FieldDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.FieldDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.number != null)
                        message.number = object.number | 0;
                    switch (object.label) {
                    default:
                        if (typeof object.label === "number") {
                            message.label = object.label;
                            break;
                        }
                        break;
                    case "LABEL_OPTIONAL":
                    case 1:
                        message.label = 1;
                        break;
                    case "LABEL_REPEATED":
                    case 3:
                        message.label = 3;
                        break;
                    case "LABEL_REQUIRED":
                    case 2:
                        message.label = 2;
                        break;
                    }
                    switch (object.type) {
                    default:
                        if (typeof object.type === "number") {
                            message.type = object.type;
                            break;
                        }
                        break;
                    case "TYPE_DOUBLE":
                    case 1:
                        message.type = 1;
                        break;
                    case "TYPE_FLOAT":
                    case 2:
                        message.type = 2;
                        break;
                    case "TYPE_INT64":
                    case 3:
                        message.type = 3;
                        break;
                    case "TYPE_UINT64":
                    case 4:
                        message.type = 4;
                        break;
                    case "TYPE_INT32":
                    case 5:
                        message.type = 5;
                        break;
                    case "TYPE_FIXED64":
                    case 6:
                        message.type = 6;
                        break;
                    case "TYPE_FIXED32":
                    case 7:
                        message.type = 7;
                        break;
                    case "TYPE_BOOL":
                    case 8:
                        message.type = 8;
                        break;
                    case "TYPE_STRING":
                    case 9:
                        message.type = 9;
                        break;
                    case "TYPE_GROUP":
                    case 10:
                        message.type = 10;
                        break;
                    case "TYPE_MESSAGE":
                    case 11:
                        message.type = 11;
                        break;
                    case "TYPE_BYTES":
                    case 12:
                        message.type = 12;
                        break;
                    case "TYPE_UINT32":
                    case 13:
                        message.type = 13;
                        break;
                    case "TYPE_ENUM":
                    case 14:
                        message.type = 14;
                        break;
                    case "TYPE_SFIXED32":
                    case 15:
                        message.type = 15;
                        break;
                    case "TYPE_SFIXED64":
                    case 16:
                        message.type = 16;
                        break;
                    case "TYPE_SINT32":
                    case 17:
                        message.type = 17;
                        break;
                    case "TYPE_SINT64":
                    case 18:
                        message.type = 18;
                        break;
                    }
                    if (object.typeName != null)
                        message.typeName = String(object.typeName);
                    if (object.extendee != null)
                        message.extendee = String(object.extendee);
                    if (object.defaultValue != null)
                        message.defaultValue = String(object.defaultValue);
                    if (object.oneofIndex != null)
                        message.oneofIndex = object.oneofIndex | 0;
                    if (object.jsonName != null)
                        message.jsonName = String(object.jsonName);
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.FieldOptions.fromObject(object.options);
                    }
                    if (object.proto3Optional != null)
                        message.proto3Optional = Boolean(object.proto3Optional);
                    return message;
                };
    
                /**
                 * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FieldDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.extendee = "";
                        object.number = 0;
                        object.label = options.enums === String ? "LABEL_OPTIONAL" : 1;
                        object.type = options.enums === String ? "TYPE_DOUBLE" : 1;
                        object.typeName = "";
                        object.defaultValue = "";
                        object.options = null;
                        object.oneofIndex = 0;
                        object.jsonName = "";
                        object.proto3Optional = false;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.extendee != null && message.hasOwnProperty("extendee"))
                        object.extendee = message.extendee;
                    if (message.number != null && message.hasOwnProperty("number"))
                        object.number = message.number;
                    if (message.label != null && message.hasOwnProperty("label"))
                        object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label;
                    if (message.type != null && message.hasOwnProperty("type"))
                        object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type;
                    if (message.typeName != null && message.hasOwnProperty("typeName"))
                        object.typeName = message.typeName;
                    if (message.defaultValue != null && message.hasOwnProperty("defaultValue"))
                        object.defaultValue = message.defaultValue;
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options);
                    if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex"))
                        object.oneofIndex = message.oneofIndex;
                    if (message.jsonName != null && message.hasOwnProperty("jsonName"))
                        object.jsonName = message.jsonName;
                    if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional"))
                        object.proto3Optional = message.proto3Optional;
                    return object;
                };
    
                /**
                 * Converts this FieldDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FieldDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FieldDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.FieldDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto";
                };
    
                /**
                 * Type enum.
                 * @name google.protobuf.FieldDescriptorProto.Type
                 * @enum {number}
                 * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value
                 * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value
                 * @property {number} TYPE_INT64=3 TYPE_INT64 value
                 * @property {number} TYPE_UINT64=4 TYPE_UINT64 value
                 * @property {number} TYPE_INT32=5 TYPE_INT32 value
                 * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value
                 * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value
                 * @property {number} TYPE_BOOL=8 TYPE_BOOL value
                 * @property {number} TYPE_STRING=9 TYPE_STRING value
                 * @property {number} TYPE_GROUP=10 TYPE_GROUP value
                 * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value
                 * @property {number} TYPE_BYTES=12 TYPE_BYTES value
                 * @property {number} TYPE_UINT32=13 TYPE_UINT32 value
                 * @property {number} TYPE_ENUM=14 TYPE_ENUM value
                 * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value
                 * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value
                 * @property {number} TYPE_SINT32=17 TYPE_SINT32 value
                 * @property {number} TYPE_SINT64=18 TYPE_SINT64 value
                 */
                FieldDescriptorProto.Type = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[1] = "TYPE_DOUBLE"] = 1;
                    values[valuesById[2] = "TYPE_FLOAT"] = 2;
                    values[valuesById[3] = "TYPE_INT64"] = 3;
                    values[valuesById[4] = "TYPE_UINT64"] = 4;
                    values[valuesById[5] = "TYPE_INT32"] = 5;
                    values[valuesById[6] = "TYPE_FIXED64"] = 6;
                    values[valuesById[7] = "TYPE_FIXED32"] = 7;
                    values[valuesById[8] = "TYPE_BOOL"] = 8;
                    values[valuesById[9] = "TYPE_STRING"] = 9;
                    values[valuesById[10] = "TYPE_GROUP"] = 10;
                    values[valuesById[11] = "TYPE_MESSAGE"] = 11;
                    values[valuesById[12] = "TYPE_BYTES"] = 12;
                    values[valuesById[13] = "TYPE_UINT32"] = 13;
                    values[valuesById[14] = "TYPE_ENUM"] = 14;
                    values[valuesById[15] = "TYPE_SFIXED32"] = 15;
                    values[valuesById[16] = "TYPE_SFIXED64"] = 16;
                    values[valuesById[17] = "TYPE_SINT32"] = 17;
                    values[valuesById[18] = "TYPE_SINT64"] = 18;
                    return values;
                })();
    
                /**
                 * Label enum.
                 * @name google.protobuf.FieldDescriptorProto.Label
                 * @enum {number}
                 * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value
                 * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value
                 * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value
                 */
                FieldDescriptorProto.Label = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[1] = "LABEL_OPTIONAL"] = 1;
                    values[valuesById[3] = "LABEL_REPEATED"] = 3;
                    values[valuesById[2] = "LABEL_REQUIRED"] = 2;
                    return values;
                })();
    
                return FieldDescriptorProto;
            })();
    
            protobuf.OneofDescriptorProto = (function() {
    
                /**
                 * Properties of an OneofDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IOneofDescriptorProto
                 * @property {string|null} [name] OneofDescriptorProto name
                 * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options
                 */
    
                /**
                 * Constructs a new OneofDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents an OneofDescriptorProto.
                 * @implements IOneofDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
                 */
                function OneofDescriptorProto(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * OneofDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @instance
                 */
                OneofDescriptorProto.prototype.name = "";
    
                /**
                 * OneofDescriptorProto options.
                 * @member {google.protobuf.IOneofOptions|null|undefined} options
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @instance
                 */
                OneofDescriptorProto.prototype.options = null;
    
                /**
                 * Creates a new OneofDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance
                 */
                OneofDescriptorProto.create = function create(properties) {
                    return new OneofDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OneofDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an OneofDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OneofDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an OneofDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                OneofDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.OneofOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto
                 */
                OneofDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.OneofDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.OneofDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.OneofOptions.fromObject(object.options);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                OneofDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.options = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options);
                    return object;
                };
    
                /**
                 * Converts this OneofDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                OneofDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for OneofDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.OneofDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto";
                };
    
                return OneofDescriptorProto;
            })();
    
            protobuf.EnumDescriptorProto = (function() {
    
                /**
                 * Properties of an EnumDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IEnumDescriptorProto
                 * @property {string|null} [name] EnumDescriptorProto name
                 * @property {Array.<google.protobuf.IEnumValueDescriptorProto>|null} [value] EnumDescriptorProto value
                 * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options
                 * @property {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>|null} [reservedRange] EnumDescriptorProto reservedRange
                 * @property {Array.<string>|null} [reservedName] EnumDescriptorProto reservedName
                 */
    
                /**
                 * Constructs a new EnumDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents an EnumDescriptorProto.
                 * @implements IEnumDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
                 */
                function EnumDescriptorProto(properties) {
                    this.value = [];
                    this.reservedRange = [];
                    this.reservedName = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * EnumDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 */
                EnumDescriptorProto.prototype.name = "";
    
                /**
                 * EnumDescriptorProto value.
                 * @member {Array.<google.protobuf.IEnumValueDescriptorProto>} value
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 */
                EnumDescriptorProto.prototype.value = $util.emptyArray;
    
                /**
                 * EnumDescriptorProto options.
                 * @member {google.protobuf.IEnumOptions|null|undefined} options
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 */
                EnumDescriptorProto.prototype.options = null;
    
                /**
                 * EnumDescriptorProto reservedRange.
                 * @member {Array.<google.protobuf.EnumDescriptorProto.IEnumReservedRange>} reservedRange
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 */
                EnumDescriptorProto.prototype.reservedRange = $util.emptyArray;
    
                /**
                 * EnumDescriptorProto reservedName.
                 * @member {Array.<string>} reservedName
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 */
                EnumDescriptorProto.prototype.reservedName = $util.emptyArray;
    
                /**
                 * Creates a new EnumDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance
                 */
                EnumDescriptorProto.create = function create(properties) {
                    return new EnumDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.value != null && message.value.length)
                        for (var i = 0; i < message.value.length; ++i)
                            $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    if (message.reservedRange != null && message.reservedRange.length)
                        for (var i = 0; i < message.reservedRange.length; ++i)
                            $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.reservedName != null && message.reservedName.length)
                        for (var i = 0; i < message.reservedName.length; ++i)
                            writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]);
                    return writer;
                };
    
                /**
                 * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an EnumDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.value && message.value.length))
                                    message.value = [];
                                message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 3: {
                                message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32());
                                break;
                            }
                        case 4: {
                                if (!(message.reservedRange && message.reservedRange.length))
                                    message.reservedRange = [];
                                message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32()));
                                break;
                            }
                        case 5: {
                                if (!(message.reservedName && message.reservedName.length))
                                    message.reservedName = [];
                                message.reservedName.push(reader.string());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an EnumDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnumDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.value != null && message.hasOwnProperty("value")) {
                        if (!Array.isArray(message.value))
                            return "value: array expected";
                        for (var i = 0; i < message.value.length; ++i) {
                            var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]);
                            if (error)
                                return "value." + error;
                        }
                    }
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.EnumOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) {
                        if (!Array.isArray(message.reservedRange))
                            return "reservedRange: array expected";
                        for (var i = 0; i < message.reservedRange.length; ++i) {
                            var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]);
                            if (error)
                                return "reservedRange." + error;
                        }
                    }
                    if (message.reservedName != null && message.hasOwnProperty("reservedName")) {
                        if (!Array.isArray(message.reservedName))
                            return "reservedName: array expected";
                        for (var i = 0; i < message.reservedName.length; ++i)
                            if (!$util.isString(message.reservedName[i]))
                                return "reservedName: string[] expected";
                    }
                    return null;
                };
    
                /**
                 * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto
                 */
                EnumDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.EnumDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.EnumDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.value) {
                        if (!Array.isArray(object.value))
                            throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");
                        message.value = [];
                        for (var i = 0; i < object.value.length; ++i) {
                            if (typeof object.value[i] !== "object")
                                throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");
                            message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]);
                        }
                    }
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.EnumOptions.fromObject(object.options);
                    }
                    if (object.reservedRange) {
                        if (!Array.isArray(object.reservedRange))
                            throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");
                        message.reservedRange = [];
                        for (var i = 0; i < object.reservedRange.length; ++i) {
                            if (typeof object.reservedRange[i] !== "object")
                                throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");
                            message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]);
                        }
                    }
                    if (object.reservedName) {
                        if (!Array.isArray(object.reservedName))
                            throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");
                        message.reservedName = [];
                        for (var i = 0; i < object.reservedName.length; ++i)
                            message.reservedName[i] = String(object.reservedName[i]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnumDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.value = [];
                        object.reservedRange = [];
                        object.reservedName = [];
                    }
                    if (options.defaults) {
                        object.name = "";
                        object.options = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.value && message.value.length) {
                        object.value = [];
                        for (var j = 0; j < message.value.length; ++j)
                            object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options);
                    }
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options);
                    if (message.reservedRange && message.reservedRange.length) {
                        object.reservedRange = [];
                        for (var j = 0; j < message.reservedRange.length; ++j)
                            object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options);
                    }
                    if (message.reservedName && message.reservedName.length) {
                        object.reservedName = [];
                        for (var j = 0; j < message.reservedName.length; ++j)
                            object.reservedName[j] = message.reservedName[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this EnumDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnumDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for EnumDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.EnumDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto";
                };
    
                EnumDescriptorProto.EnumReservedRange = (function() {
    
                    /**
                     * Properties of an EnumReservedRange.
                     * @memberof google.protobuf.EnumDescriptorProto
                     * @interface IEnumReservedRange
                     * @property {number|null} [start] EnumReservedRange start
                     * @property {number|null} [end] EnumReservedRange end
                     */
    
                    /**
                     * Constructs a new EnumReservedRange.
                     * @memberof google.protobuf.EnumDescriptorProto
                     * @classdesc Represents an EnumReservedRange.
                     * @implements IEnumReservedRange
                     * @constructor
                     * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
                     */
                    function EnumReservedRange(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * EnumReservedRange start.
                     * @member {number} start
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @instance
                     */
                    EnumReservedRange.prototype.start = 0;
    
                    /**
                     * EnumReservedRange end.
                     * @member {number} end
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @instance
                     */
                    EnumReservedRange.prototype.end = 0;
    
                    /**
                     * Creates a new EnumReservedRange instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set
                     * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance
                     */
                    EnumReservedRange.create = function create(properties) {
                        return new EnumReservedRange(properties);
                    };
    
                    /**
                     * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    EnumReservedRange.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.start != null && Object.hasOwnProperty.call(message, "start"))
                            writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start);
                        if (message.end != null && Object.hasOwnProperty.call(message, "end"))
                            writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes an EnumReservedRange message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    EnumReservedRange.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.start = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.end = reader.int32();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    EnumReservedRange.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies an EnumReservedRange message.
                     * @function verify
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    EnumReservedRange.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.start != null && message.hasOwnProperty("start"))
                            if (!$util.isInteger(message.start))
                                return "start: integer expected";
                        if (message.end != null && message.hasOwnProperty("end"))
                            if (!$util.isInteger(message.end))
                                return "end: integer expected";
                        return null;
                    };
    
                    /**
                     * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange
                     */
                    EnumReservedRange.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange)
                            return object;
                        var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange();
                        if (object.start != null)
                            message.start = object.start | 0;
                        if (object.end != null)
                            message.end = object.end | 0;
                        return message;
                    };
    
                    /**
                     * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    EnumReservedRange.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.start = 0;
                            object.end = 0;
                        }
                        if (message.start != null && message.hasOwnProperty("start"))
                            object.start = message.start;
                        if (message.end != null && message.hasOwnProperty("end"))
                            object.end = message.end;
                        return object;
                    };
    
                    /**
                     * Converts this EnumReservedRange to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    EnumReservedRange.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for EnumReservedRange
                     * @function getTypeUrl
                     * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange";
                    };
    
                    return EnumReservedRange;
                })();
    
                return EnumDescriptorProto;
            })();
    
            protobuf.EnumValueDescriptorProto = (function() {
    
                /**
                 * Properties of an EnumValueDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IEnumValueDescriptorProto
                 * @property {string|null} [name] EnumValueDescriptorProto name
                 * @property {number|null} [number] EnumValueDescriptorProto number
                 * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options
                 */
    
                /**
                 * Constructs a new EnumValueDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents an EnumValueDescriptorProto.
                 * @implements IEnumValueDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
                 */
                function EnumValueDescriptorProto(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * EnumValueDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @instance
                 */
                EnumValueDescriptorProto.prototype.name = "";
    
                /**
                 * EnumValueDescriptorProto number.
                 * @member {number} number
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @instance
                 */
                EnumValueDescriptorProto.prototype.number = 0;
    
                /**
                 * EnumValueDescriptorProto options.
                 * @member {google.protobuf.IEnumValueOptions|null|undefined} options
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @instance
                 */
                EnumValueDescriptorProto.prototype.options = null;
    
                /**
                 * Creates a new EnumValueDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance
                 */
                EnumValueDescriptorProto.create = function create(properties) {
                    return new EnumValueDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumValueDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.number != null && Object.hasOwnProperty.call(message, "number"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number);
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an EnumValueDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumValueDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.number = reader.int32();
                                break;
                            }
                        case 3: {
                                message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an EnumValueDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnumValueDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.number != null && message.hasOwnProperty("number"))
                        if (!$util.isInteger(message.number))
                            return "number: integer expected";
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.EnumValueOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto
                 */
                EnumValueDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.EnumValueDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.EnumValueDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.number != null)
                        message.number = object.number | 0;
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnumValueDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.number = 0;
                        object.options = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.number != null && message.hasOwnProperty("number"))
                        object.number = message.number;
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options);
                    return object;
                };
    
                /**
                 * Converts this EnumValueDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnumValueDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for EnumValueDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.EnumValueDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto";
                };
    
                return EnumValueDescriptorProto;
            })();
    
            protobuf.ServiceDescriptorProto = (function() {
    
                /**
                 * Properties of a ServiceDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IServiceDescriptorProto
                 * @property {string|null} [name] ServiceDescriptorProto name
                 * @property {Array.<google.protobuf.IMethodDescriptorProto>|null} [method] ServiceDescriptorProto method
                 * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options
                 */
    
                /**
                 * Constructs a new ServiceDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents a ServiceDescriptorProto.
                 * @implements IServiceDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
                 */
                function ServiceDescriptorProto(properties) {
                    this.method = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ServiceDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @instance
                 */
                ServiceDescriptorProto.prototype.name = "";
    
                /**
                 * ServiceDescriptorProto method.
                 * @member {Array.<google.protobuf.IMethodDescriptorProto>} method
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @instance
                 */
                ServiceDescriptorProto.prototype.method = $util.emptyArray;
    
                /**
                 * ServiceDescriptorProto options.
                 * @member {google.protobuf.IServiceOptions|null|undefined} options
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @instance
                 */
                ServiceDescriptorProto.prototype.options = null;
    
                /**
                 * Creates a new ServiceDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance
                 */
                ServiceDescriptorProto.create = function create(properties) {
                    return new ServiceDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ServiceDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.method != null && message.method.length)
                        for (var i = 0; i < message.method.length; ++i)
                            $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ServiceDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ServiceDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                if (!(message.method && message.method.length))
                                    message.method = [];
                                message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32()));
                                break;
                            }
                        case 3: {
                                message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ServiceDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ServiceDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.method != null && message.hasOwnProperty("method")) {
                        if (!Array.isArray(message.method))
                            return "method: array expected";
                        for (var i = 0; i < message.method.length; ++i) {
                            var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]);
                            if (error)
                                return "method." + error;
                        }
                    }
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.ServiceOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto
                 */
                ServiceDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.ServiceDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.ServiceDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.method) {
                        if (!Array.isArray(object.method))
                            throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");
                        message.method = [];
                        for (var i = 0; i < object.method.length; ++i) {
                            if (typeof object.method[i] !== "object")
                                throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");
                            message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]);
                        }
                    }
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ServiceDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.method = [];
                    if (options.defaults) {
                        object.name = "";
                        object.options = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.method && message.method.length) {
                        object.method = [];
                        for (var j = 0; j < message.method.length; ++j)
                            object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options);
                    }
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options);
                    return object;
                };
    
                /**
                 * Converts this ServiceDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ServiceDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ServiceDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.ServiceDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto";
                };
    
                return ServiceDescriptorProto;
            })();
    
            protobuf.MethodDescriptorProto = (function() {
    
                /**
                 * Properties of a MethodDescriptorProto.
                 * @memberof google.protobuf
                 * @interface IMethodDescriptorProto
                 * @property {string|null} [name] MethodDescriptorProto name
                 * @property {string|null} [inputType] MethodDescriptorProto inputType
                 * @property {string|null} [outputType] MethodDescriptorProto outputType
                 * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options
                 * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming
                 * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming
                 */
    
                /**
                 * Constructs a new MethodDescriptorProto.
                 * @memberof google.protobuf
                 * @classdesc Represents a MethodDescriptorProto.
                 * @implements IMethodDescriptorProto
                 * @constructor
                 * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
                 */
                function MethodDescriptorProto(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * MethodDescriptorProto name.
                 * @member {string} name
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.name = "";
    
                /**
                 * MethodDescriptorProto inputType.
                 * @member {string} inputType
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.inputType = "";
    
                /**
                 * MethodDescriptorProto outputType.
                 * @member {string} outputType
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.outputType = "";
    
                /**
                 * MethodDescriptorProto options.
                 * @member {google.protobuf.IMethodOptions|null|undefined} options
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.options = null;
    
                /**
                 * MethodDescriptorProto clientStreaming.
                 * @member {boolean} clientStreaming
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.clientStreaming = false;
    
                /**
                 * MethodDescriptorProto serverStreaming.
                 * @member {boolean} serverStreaming
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 */
                MethodDescriptorProto.prototype.serverStreaming = false;
    
                /**
                 * Creates a new MethodDescriptorProto instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set
                 * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance
                 */
                MethodDescriptorProto.create = function create(properties) {
                    return new MethodDescriptorProto(properties);
                };
    
                /**
                 * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodDescriptorProto.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType);
                    if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType);
                    if (message.options != null && Object.hasOwnProperty.call(message, "options"))
                        $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming"))
                        writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming);
                    if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming"))
                        writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming);
                    return writer;
                };
    
                /**
                 * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a MethodDescriptorProto message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodDescriptorProto.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.inputType = reader.string();
                                break;
                            }
                        case 3: {
                                message.outputType = reader.string();
                                break;
                            }
                        case 4: {
                                message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32());
                                break;
                            }
                        case 5: {
                                message.clientStreaming = reader.bool();
                                break;
                            }
                        case 6: {
                                message.serverStreaming = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a MethodDescriptorProto message.
                 * @function verify
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MethodDescriptorProto.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.inputType != null && message.hasOwnProperty("inputType"))
                        if (!$util.isString(message.inputType))
                            return "inputType: string expected";
                    if (message.outputType != null && message.hasOwnProperty("outputType"))
                        if (!$util.isString(message.outputType))
                            return "outputType: string expected";
                    if (message.options != null && message.hasOwnProperty("options")) {
                        var error = $root.google.protobuf.MethodOptions.verify(message.options);
                        if (error)
                            return "options." + error;
                    }
                    if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
                        if (typeof message.clientStreaming !== "boolean")
                            return "clientStreaming: boolean expected";
                    if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
                        if (typeof message.serverStreaming !== "boolean")
                            return "serverStreaming: boolean expected";
                    return null;
                };
    
                /**
                 * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto
                 */
                MethodDescriptorProto.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.MethodDescriptorProto)
                        return object;
                    var message = new $root.google.protobuf.MethodDescriptorProto();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.inputType != null)
                        message.inputType = String(object.inputType);
                    if (object.outputType != null)
                        message.outputType = String(object.outputType);
                    if (object.options != null) {
                        if (typeof object.options !== "object")
                            throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");
                        message.options = $root.google.protobuf.MethodOptions.fromObject(object.options);
                    }
                    if (object.clientStreaming != null)
                        message.clientStreaming = Boolean(object.clientStreaming);
                    if (object.serverStreaming != null)
                        message.serverStreaming = Boolean(object.serverStreaming);
                    return message;
                };
    
                /**
                 * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MethodDescriptorProto.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.inputType = "";
                        object.outputType = "";
                        object.options = null;
                        object.clientStreaming = false;
                        object.serverStreaming = false;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.inputType != null && message.hasOwnProperty("inputType"))
                        object.inputType = message.inputType;
                    if (message.outputType != null && message.hasOwnProperty("outputType"))
                        object.outputType = message.outputType;
                    if (message.options != null && message.hasOwnProperty("options"))
                        object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options);
                    if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming"))
                        object.clientStreaming = message.clientStreaming;
                    if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming"))
                        object.serverStreaming = message.serverStreaming;
                    return object;
                };
    
                /**
                 * Converts this MethodDescriptorProto to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MethodDescriptorProto.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for MethodDescriptorProto
                 * @function getTypeUrl
                 * @memberof google.protobuf.MethodDescriptorProto
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto";
                };
    
                return MethodDescriptorProto;
            })();
    
            protobuf.FileOptions = (function() {
    
                /**
                 * Properties of a FileOptions.
                 * @memberof google.protobuf
                 * @interface IFileOptions
                 * @property {string|null} [javaPackage] FileOptions javaPackage
                 * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname
                 * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles
                 * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash
                 * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8
                 * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor
                 * @property {string|null} [goPackage] FileOptions goPackage
                 * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices
                 * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices
                 * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices
                 * @property {boolean|null} [deprecated] FileOptions deprecated
                 * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas
                 * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix
                 * @property {string|null} [csharpNamespace] FileOptions csharpNamespace
                 * @property {string|null} [swiftPrefix] FileOptions swiftPrefix
                 * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix
                 * @property {string|null} [phpNamespace] FileOptions phpNamespace
                 * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace
                 * @property {string|null} [rubyPackage] FileOptions rubyPackage
                 * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FileOptions uninterpretedOption
                 * @property {Array.<google.api.IResourceDescriptor>|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition
                 */
    
                /**
                 * Constructs a new FileOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents a FileOptions.
                 * @implements IFileOptions
                 * @constructor
                 * @param {google.protobuf.IFileOptions=} [properties] Properties to set
                 */
                function FileOptions(properties) {
                    this.uninterpretedOption = [];
                    this[".google.api.resourceDefinition"] = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FileOptions javaPackage.
                 * @member {string} javaPackage
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaPackage = "";
    
                /**
                 * FileOptions javaOuterClassname.
                 * @member {string} javaOuterClassname
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaOuterClassname = "";
    
                /**
                 * FileOptions javaMultipleFiles.
                 * @member {boolean} javaMultipleFiles
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaMultipleFiles = false;
    
                /**
                 * FileOptions javaGenerateEqualsAndHash.
                 * @member {boolean} javaGenerateEqualsAndHash
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaGenerateEqualsAndHash = false;
    
                /**
                 * FileOptions javaStringCheckUtf8.
                 * @member {boolean} javaStringCheckUtf8
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaStringCheckUtf8 = false;
    
                /**
                 * FileOptions optimizeFor.
                 * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.optimizeFor = 1;
    
                /**
                 * FileOptions goPackage.
                 * @member {string} goPackage
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.goPackage = "";
    
                /**
                 * FileOptions ccGenericServices.
                 * @member {boolean} ccGenericServices
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.ccGenericServices = false;
    
                /**
                 * FileOptions javaGenericServices.
                 * @member {boolean} javaGenericServices
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.javaGenericServices = false;
    
                /**
                 * FileOptions pyGenericServices.
                 * @member {boolean} pyGenericServices
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.pyGenericServices = false;
    
                /**
                 * FileOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.deprecated = false;
    
                /**
                 * FileOptions ccEnableArenas.
                 * @member {boolean} ccEnableArenas
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.ccEnableArenas = true;
    
                /**
                 * FileOptions objcClassPrefix.
                 * @member {string} objcClassPrefix
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.objcClassPrefix = "";
    
                /**
                 * FileOptions csharpNamespace.
                 * @member {string} csharpNamespace
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.csharpNamespace = "";
    
                /**
                 * FileOptions swiftPrefix.
                 * @member {string} swiftPrefix
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.swiftPrefix = "";
    
                /**
                 * FileOptions phpClassPrefix.
                 * @member {string} phpClassPrefix
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.phpClassPrefix = "";
    
                /**
                 * FileOptions phpNamespace.
                 * @member {string} phpNamespace
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.phpNamespace = "";
    
                /**
                 * FileOptions phpMetadataNamespace.
                 * @member {string} phpMetadataNamespace
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.phpMetadataNamespace = "";
    
                /**
                 * FileOptions rubyPackage.
                 * @member {string} rubyPackage
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.rubyPackage = "";
    
                /**
                 * FileOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.features = null;
    
                /**
                 * FileOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * FileOptions .google.api.resourceDefinition.
                 * @member {Array.<google.api.IResourceDescriptor>} .google.api.resourceDefinition
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 */
                FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray;
    
                /**
                 * Creates a new FileOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {google.protobuf.IFileOptions=} [properties] Properties to set
                 * @returns {google.protobuf.FileOptions} FileOptions instance
                 */
                FileOptions.create = function create(properties) {
                    return new FileOptions(properties);
                };
    
                /**
                 * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage);
                    if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname"))
                        writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname);
                    if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor"))
                        writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor);
                    if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles"))
                        writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles);
                    if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage"))
                        writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage);
                    if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices"))
                        writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices);
                    if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices"))
                        writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices);
                    if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices"))
                        writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices);
                    if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash"))
                        writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash);
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated);
                    if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8"))
                        writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8);
                    if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas"))
                        writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas);
                    if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix"))
                        writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix);
                    if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace"))
                        writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace);
                    if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix"))
                        writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix);
                    if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix"))
                        writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix);
                    if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace"))
                        writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace);
                    if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace"))
                        writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace);
                    if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage"))
                        writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length)
                        for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i)
                            $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FileOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FileOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FileOptions} FileOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.javaPackage = reader.string();
                                break;
                            }
                        case 8: {
                                message.javaOuterClassname = reader.string();
                                break;
                            }
                        case 10: {
                                message.javaMultipleFiles = reader.bool();
                                break;
                            }
                        case 20: {
                                message.javaGenerateEqualsAndHash = reader.bool();
                                break;
                            }
                        case 27: {
                                message.javaStringCheckUtf8 = reader.bool();
                                break;
                            }
                        case 9: {
                                message.optimizeFor = reader.int32();
                                break;
                            }
                        case 11: {
                                message.goPackage = reader.string();
                                break;
                            }
                        case 16: {
                                message.ccGenericServices = reader.bool();
                                break;
                            }
                        case 17: {
                                message.javaGenericServices = reader.bool();
                                break;
                            }
                        case 18: {
                                message.pyGenericServices = reader.bool();
                                break;
                            }
                        case 23: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 31: {
                                message.ccEnableArenas = reader.bool();
                                break;
                            }
                        case 36: {
                                message.objcClassPrefix = reader.string();
                                break;
                            }
                        case 37: {
                                message.csharpNamespace = reader.string();
                                break;
                            }
                        case 39: {
                                message.swiftPrefix = reader.string();
                                break;
                            }
                        case 40: {
                                message.phpClassPrefix = reader.string();
                                break;
                            }
                        case 41: {
                                message.phpNamespace = reader.string();
                                break;
                            }
                        case 44: {
                                message.phpMetadataNamespace = reader.string();
                                break;
                            }
                        case 45: {
                                message.rubyPackage = reader.string();
                                break;
                            }
                        case 50: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 1053: {
                                if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length))
                                    message[".google.api.resourceDefinition"] = [];
                                message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FileOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FileOptions} FileOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FileOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FileOptions message.
                 * @function verify
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FileOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
                        if (!$util.isString(message.javaPackage))
                            return "javaPackage: string expected";
                    if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
                        if (!$util.isString(message.javaOuterClassname))
                            return "javaOuterClassname: string expected";
                    if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
                        if (typeof message.javaMultipleFiles !== "boolean")
                            return "javaMultipleFiles: boolean expected";
                    if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
                        if (typeof message.javaGenerateEqualsAndHash !== "boolean")
                            return "javaGenerateEqualsAndHash: boolean expected";
                    if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
                        if (typeof message.javaStringCheckUtf8 !== "boolean")
                            return "javaStringCheckUtf8: boolean expected";
                    if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
                        switch (message.optimizeFor) {
                        default:
                            return "optimizeFor: enum value expected";
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    if (message.goPackage != null && message.hasOwnProperty("goPackage"))
                        if (!$util.isString(message.goPackage))
                            return "goPackage: string expected";
                    if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
                        if (typeof message.ccGenericServices !== "boolean")
                            return "ccGenericServices: boolean expected";
                    if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
                        if (typeof message.javaGenericServices !== "boolean")
                            return "javaGenericServices: boolean expected";
                    if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
                        if (typeof message.pyGenericServices !== "boolean")
                            return "pyGenericServices: boolean expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
                        if (typeof message.ccEnableArenas !== "boolean")
                            return "ccEnableArenas: boolean expected";
                    if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
                        if (!$util.isString(message.objcClassPrefix))
                            return "objcClassPrefix: string expected";
                    if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
                        if (!$util.isString(message.csharpNamespace))
                            return "csharpNamespace: string expected";
                    if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
                        if (!$util.isString(message.swiftPrefix))
                            return "swiftPrefix: string expected";
                    if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
                        if (!$util.isString(message.phpClassPrefix))
                            return "phpClassPrefix: string expected";
                    if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
                        if (!$util.isString(message.phpNamespace))
                            return "phpNamespace: string expected";
                    if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
                        if (!$util.isString(message.phpMetadataNamespace))
                            return "phpMetadataNamespace: string expected";
                    if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
                        if (!$util.isString(message.rubyPackage))
                            return "rubyPackage: string expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) {
                        if (!Array.isArray(message[".google.api.resourceDefinition"]))
                            return ".google.api.resourceDefinition: array expected";
                        for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) {
                            var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]);
                            if (error)
                                return ".google.api.resourceDefinition." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a FileOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FileOptions} FileOptions
                 */
                FileOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FileOptions)
                        return object;
                    var message = new $root.google.protobuf.FileOptions();
                    if (object.javaPackage != null)
                        message.javaPackage = String(object.javaPackage);
                    if (object.javaOuterClassname != null)
                        message.javaOuterClassname = String(object.javaOuterClassname);
                    if (object.javaMultipleFiles != null)
                        message.javaMultipleFiles = Boolean(object.javaMultipleFiles);
                    if (object.javaGenerateEqualsAndHash != null)
                        message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash);
                    if (object.javaStringCheckUtf8 != null)
                        message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8);
                    switch (object.optimizeFor) {
                    default:
                        if (typeof object.optimizeFor === "number") {
                            message.optimizeFor = object.optimizeFor;
                            break;
                        }
                        break;
                    case "SPEED":
                    case 1:
                        message.optimizeFor = 1;
                        break;
                    case "CODE_SIZE":
                    case 2:
                        message.optimizeFor = 2;
                        break;
                    case "LITE_RUNTIME":
                    case 3:
                        message.optimizeFor = 3;
                        break;
                    }
                    if (object.goPackage != null)
                        message.goPackage = String(object.goPackage);
                    if (object.ccGenericServices != null)
                        message.ccGenericServices = Boolean(object.ccGenericServices);
                    if (object.javaGenericServices != null)
                        message.javaGenericServices = Boolean(object.javaGenericServices);
                    if (object.pyGenericServices != null)
                        message.pyGenericServices = Boolean(object.pyGenericServices);
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.ccEnableArenas != null)
                        message.ccEnableArenas = Boolean(object.ccEnableArenas);
                    if (object.objcClassPrefix != null)
                        message.objcClassPrefix = String(object.objcClassPrefix);
                    if (object.csharpNamespace != null)
                        message.csharpNamespace = String(object.csharpNamespace);
                    if (object.swiftPrefix != null)
                        message.swiftPrefix = String(object.swiftPrefix);
                    if (object.phpClassPrefix != null)
                        message.phpClassPrefix = String(object.phpClassPrefix);
                    if (object.phpNamespace != null)
                        message.phpNamespace = String(object.phpNamespace);
                    if (object.phpMetadataNamespace != null)
                        message.phpMetadataNamespace = String(object.phpMetadataNamespace);
                    if (object.rubyPackage != null)
                        message.rubyPackage = String(object.rubyPackage);
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.FileOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object[".google.api.resourceDefinition"]) {
                        if (!Array.isArray(object[".google.api.resourceDefinition"]))
                            throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected");
                        message[".google.api.resourceDefinition"] = [];
                        for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) {
                            if (typeof object[".google.api.resourceDefinition"][i] !== "object")
                                throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected");
                            message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FileOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {google.protobuf.FileOptions} message FileOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FileOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.uninterpretedOption = [];
                        object[".google.api.resourceDefinition"] = [];
                    }
                    if (options.defaults) {
                        object.javaPackage = "";
                        object.javaOuterClassname = "";
                        object.optimizeFor = options.enums === String ? "SPEED" : 1;
                        object.javaMultipleFiles = false;
                        object.goPackage = "";
                        object.ccGenericServices = false;
                        object.javaGenericServices = false;
                        object.pyGenericServices = false;
                        object.javaGenerateEqualsAndHash = false;
                        object.deprecated = false;
                        object.javaStringCheckUtf8 = false;
                        object.ccEnableArenas = true;
                        object.objcClassPrefix = "";
                        object.csharpNamespace = "";
                        object.swiftPrefix = "";
                        object.phpClassPrefix = "";
                        object.phpNamespace = "";
                        object.phpMetadataNamespace = "";
                        object.rubyPackage = "";
                        object.features = null;
                    }
                    if (message.javaPackage != null && message.hasOwnProperty("javaPackage"))
                        object.javaPackage = message.javaPackage;
                    if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname"))
                        object.javaOuterClassname = message.javaOuterClassname;
                    if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor"))
                        object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor;
                    if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles"))
                        object.javaMultipleFiles = message.javaMultipleFiles;
                    if (message.goPackage != null && message.hasOwnProperty("goPackage"))
                        object.goPackage = message.goPackage;
                    if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices"))
                        object.ccGenericServices = message.ccGenericServices;
                    if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices"))
                        object.javaGenericServices = message.javaGenericServices;
                    if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices"))
                        object.pyGenericServices = message.pyGenericServices;
                    if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash"))
                        object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash;
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8"))
                        object.javaStringCheckUtf8 = message.javaStringCheckUtf8;
                    if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas"))
                        object.ccEnableArenas = message.ccEnableArenas;
                    if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix"))
                        object.objcClassPrefix = message.objcClassPrefix;
                    if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace"))
                        object.csharpNamespace = message.csharpNamespace;
                    if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix"))
                        object.swiftPrefix = message.swiftPrefix;
                    if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix"))
                        object.phpClassPrefix = message.phpClassPrefix;
                    if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace"))
                        object.phpNamespace = message.phpNamespace;
                    if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace"))
                        object.phpMetadataNamespace = message.phpMetadataNamespace;
                    if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage"))
                        object.rubyPackage = message.rubyPackage;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) {
                        object[".google.api.resourceDefinition"] = [];
                        for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j)
                            object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this FileOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FileOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FileOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FileOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.FileOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FileOptions";
                };
    
                /**
                 * OptimizeMode enum.
                 * @name google.protobuf.FileOptions.OptimizeMode
                 * @enum {number}
                 * @property {number} SPEED=1 SPEED value
                 * @property {number} CODE_SIZE=2 CODE_SIZE value
                 * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value
                 */
                FileOptions.OptimizeMode = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[1] = "SPEED"] = 1;
                    values[valuesById[2] = "CODE_SIZE"] = 2;
                    values[valuesById[3] = "LITE_RUNTIME"] = 3;
                    return values;
                })();
    
                return FileOptions;
            })();
    
            protobuf.MessageOptions = (function() {
    
                /**
                 * Properties of a MessageOptions.
                 * @memberof google.protobuf
                 * @interface IMessageOptions
                 * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat
                 * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor
                 * @property {boolean|null} [deprecated] MessageOptions deprecated
                 * @property {boolean|null} [mapEntry] MessageOptions mapEntry
                 * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts
                 * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MessageOptions uninterpretedOption
                 * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource
                 */
    
                /**
                 * Constructs a new MessageOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents a MessageOptions.
                 * @implements IMessageOptions
                 * @constructor
                 * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
                 */
                function MessageOptions(properties) {
                    this.uninterpretedOption = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * MessageOptions messageSetWireFormat.
                 * @member {boolean} messageSetWireFormat
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.messageSetWireFormat = false;
    
                /**
                 * MessageOptions noStandardDescriptorAccessor.
                 * @member {boolean} noStandardDescriptorAccessor
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.noStandardDescriptorAccessor = false;
    
                /**
                 * MessageOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.deprecated = false;
    
                /**
                 * MessageOptions mapEntry.
                 * @member {boolean} mapEntry
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.mapEntry = false;
    
                /**
                 * MessageOptions deprecatedLegacyJsonFieldConflicts.
                 * @member {boolean} deprecatedLegacyJsonFieldConflicts
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false;
    
                /**
                 * MessageOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.features = null;
    
                /**
                 * MessageOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * MessageOptions .google.api.resource.
                 * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 */
                MessageOptions.prototype[".google.api.resource"] = null;
    
                /**
                 * Creates a new MessageOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {google.protobuf.IMessageOptions=} [properties] Properties to set
                 * @returns {google.protobuf.MessageOptions} MessageOptions instance
                 */
                MessageOptions.create = function create(properties) {
                    return new MessageOptions(properties);
                };
    
                /**
                 * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MessageOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat"))
                        writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat);
                    if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor);
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
                    if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry"))
                        writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry);
                    if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts"))
                        writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource"))
                        $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MessageOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a MessageOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.MessageOptions} MessageOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MessageOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.messageSetWireFormat = reader.bool();
                                break;
                            }
                        case 2: {
                                message.noStandardDescriptorAccessor = reader.bool();
                                break;
                            }
                        case 3: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 7: {
                                message.mapEntry = reader.bool();
                                break;
                            }
                        case 11: {
                                message.deprecatedLegacyJsonFieldConflicts = reader.bool();
                                break;
                            }
                        case 12: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 1053: {
                                message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a MessageOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.MessageOptions} MessageOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MessageOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a MessageOptions message.
                 * @function verify
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MessageOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
                        if (typeof message.messageSetWireFormat !== "boolean")
                            return "messageSetWireFormat: boolean expected";
                    if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
                        if (typeof message.noStandardDescriptorAccessor !== "boolean")
                            return "noStandardDescriptorAccessor: boolean expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
                        if (typeof message.mapEntry !== "boolean")
                            return "mapEntry: boolean expected";
                    if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
                        if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean")
                            return "deprecatedLegacyJsonFieldConflicts: boolean expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) {
                        var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]);
                        if (error)
                            return ".google.api.resource." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.MessageOptions} MessageOptions
                 */
                MessageOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.MessageOptions)
                        return object;
                    var message = new $root.google.protobuf.MessageOptions();
                    if (object.messageSetWireFormat != null)
                        message.messageSetWireFormat = Boolean(object.messageSetWireFormat);
                    if (object.noStandardDescriptorAccessor != null)
                        message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor);
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.mapEntry != null)
                        message.mapEntry = Boolean(object.mapEntry);
                    if (object.deprecatedLegacyJsonFieldConflicts != null)
                        message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts);
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.MessageOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object[".google.api.resource"] != null) {
                        if (typeof object[".google.api.resource"] !== "object")
                            throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected");
                        message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a MessageOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {google.protobuf.MessageOptions} message MessageOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MessageOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.uninterpretedOption = [];
                    if (options.defaults) {
                        object.messageSetWireFormat = false;
                        object.noStandardDescriptorAccessor = false;
                        object.deprecated = false;
                        object.mapEntry = false;
                        object.deprecatedLegacyJsonFieldConflicts = false;
                        object.features = null;
                        object[".google.api.resource"] = null;
                    }
                    if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat"))
                        object.messageSetWireFormat = message.messageSetWireFormat;
                    if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor"))
                        object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor;
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.mapEntry != null && message.hasOwnProperty("mapEntry"))
                        object.mapEntry = message.mapEntry;
                    if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
                        object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource"))
                        object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options);
                    return object;
                };
    
                /**
                 * Converts this MessageOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.MessageOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MessageOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for MessageOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.MessageOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.MessageOptions";
                };
    
                return MessageOptions;
            })();
    
            protobuf.FieldOptions = (function() {
    
                /**
                 * Properties of a FieldOptions.
                 * @memberof google.protobuf
                 * @interface IFieldOptions
                 * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype
                 * @property {boolean|null} [packed] FieldOptions packed
                 * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype
                 * @property {boolean|null} [lazy] FieldOptions lazy
                 * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy
                 * @property {boolean|null} [deprecated] FieldOptions deprecated
                 * @property {boolean|null} [weak] FieldOptions weak
                 * @property {boolean|null} [debugRedact] FieldOptions debugRedact
                 * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention
                 * @property {Array.<google.protobuf.FieldOptions.OptionTargetType>|null} [targets] FieldOptions targets
                 * @property {Array.<google.protobuf.FieldOptions.IEditionDefault>|null} [editionDefaults] FieldOptions editionDefaults
                 * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] FieldOptions uninterpretedOption
                 * @property {Array.<google.api.FieldBehavior>|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior
                 * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference
                 */
    
                /**
                 * Constructs a new FieldOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents a FieldOptions.
                 * @implements IFieldOptions
                 * @constructor
                 * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
                 */
                function FieldOptions(properties) {
                    this.targets = [];
                    this.editionDefaults = [];
                    this.uninterpretedOption = [];
                    this[".google.api.fieldBehavior"] = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FieldOptions ctype.
                 * @member {google.protobuf.FieldOptions.CType} ctype
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.ctype = 0;
    
                /**
                 * FieldOptions packed.
                 * @member {boolean} packed
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.packed = false;
    
                /**
                 * FieldOptions jstype.
                 * @member {google.protobuf.FieldOptions.JSType} jstype
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.jstype = 0;
    
                /**
                 * FieldOptions lazy.
                 * @member {boolean} lazy
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.lazy = false;
    
                /**
                 * FieldOptions unverifiedLazy.
                 * @member {boolean} unverifiedLazy
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.unverifiedLazy = false;
    
                /**
                 * FieldOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.deprecated = false;
    
                /**
                 * FieldOptions weak.
                 * @member {boolean} weak
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.weak = false;
    
                /**
                 * FieldOptions debugRedact.
                 * @member {boolean} debugRedact
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.debugRedact = false;
    
                /**
                 * FieldOptions retention.
                 * @member {google.protobuf.FieldOptions.OptionRetention} retention
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.retention = 0;
    
                /**
                 * FieldOptions targets.
                 * @member {Array.<google.protobuf.FieldOptions.OptionTargetType>} targets
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.targets = $util.emptyArray;
    
                /**
                 * FieldOptions editionDefaults.
                 * @member {Array.<google.protobuf.FieldOptions.IEditionDefault>} editionDefaults
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.editionDefaults = $util.emptyArray;
    
                /**
                 * FieldOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.features = null;
    
                /**
                 * FieldOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * FieldOptions .google.api.fieldBehavior.
                 * @member {Array.<google.api.FieldBehavior>} .google.api.fieldBehavior
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray;
    
                /**
                 * FieldOptions .google.api.resourceReference.
                 * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 */
                FieldOptions.prototype[".google.api.resourceReference"] = null;
    
                /**
                 * Creates a new FieldOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {google.protobuf.IFieldOptions=} [properties] Properties to set
                 * @returns {google.protobuf.FieldOptions} FieldOptions instance
                 */
                FieldOptions.create = function create(properties) {
                    return new FieldOptions(properties);
                };
    
                /**
                 * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype);
                    if (message.packed != null && Object.hasOwnProperty.call(message, "packed"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed);
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
                    if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy"))
                        writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy);
                    if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype"))
                        writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype);
                    if (message.weak != null && Object.hasOwnProperty.call(message, "weak"))
                        writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak);
                    if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy"))
                        writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy);
                    if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact"))
                        writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact);
                    if (message.retention != null && Object.hasOwnProperty.call(message, "retention"))
                        writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention);
                    if (message.targets != null && message.targets.length)
                        for (var i = 0; i < message.targets.length; ++i)
                            writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]);
                    if (message.editionDefaults != null && message.editionDefaults.length)
                        for (var i = 0; i < message.editionDefaults.length; ++i)
                            $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim();
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) {
                        writer.uint32(/* id 1052, wireType 2 =*/8418).fork();
                        for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
                            writer.int32(message[".google.api.fieldBehavior"][i]);
                        writer.ldelim();
                    }
                    if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference"))
                        $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FieldOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FieldOptions} FieldOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.ctype = reader.int32();
                                break;
                            }
                        case 2: {
                                message.packed = reader.bool();
                                break;
                            }
                        case 6: {
                                message.jstype = reader.int32();
                                break;
                            }
                        case 5: {
                                message.lazy = reader.bool();
                                break;
                            }
                        case 15: {
                                message.unverifiedLazy = reader.bool();
                                break;
                            }
                        case 3: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 10: {
                                message.weak = reader.bool();
                                break;
                            }
                        case 16: {
                                message.debugRedact = reader.bool();
                                break;
                            }
                        case 17: {
                                message.retention = reader.int32();
                                break;
                            }
                        case 19: {
                                if (!(message.targets && message.targets.length))
                                    message.targets = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message.targets.push(reader.int32());
                                } else
                                    message.targets.push(reader.int32());
                                break;
                            }
                        case 20: {
                                if (!(message.editionDefaults && message.editionDefaults.length))
                                    message.editionDefaults = [];
                                message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32()));
                                break;
                            }
                        case 21: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 1052: {
                                if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length))
                                    message[".google.api.fieldBehavior"] = [];
                                if ((tag & 7) === 2) {
                                    var end2 = reader.uint32() + reader.pos;
                                    while (reader.pos < end2)
                                        message[".google.api.fieldBehavior"].push(reader.int32());
                                } else
                                    message[".google.api.fieldBehavior"].push(reader.int32());
                                break;
                            }
                        case 1055: {
                                message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FieldOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FieldOptions} FieldOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FieldOptions message.
                 * @function verify
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FieldOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.ctype != null && message.hasOwnProperty("ctype"))
                        switch (message.ctype) {
                        default:
                            return "ctype: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.packed != null && message.hasOwnProperty("packed"))
                        if (typeof message.packed !== "boolean")
                            return "packed: boolean expected";
                    if (message.jstype != null && message.hasOwnProperty("jstype"))
                        switch (message.jstype) {
                        default:
                            return "jstype: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.lazy != null && message.hasOwnProperty("lazy"))
                        if (typeof message.lazy !== "boolean")
                            return "lazy: boolean expected";
                    if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
                        if (typeof message.unverifiedLazy !== "boolean")
                            return "unverifiedLazy: boolean expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.weak != null && message.hasOwnProperty("weak"))
                        if (typeof message.weak !== "boolean")
                            return "weak: boolean expected";
                    if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
                        if (typeof message.debugRedact !== "boolean")
                            return "debugRedact: boolean expected";
                    if (message.retention != null && message.hasOwnProperty("retention"))
                        switch (message.retention) {
                        default:
                            return "retention: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.targets != null && message.hasOwnProperty("targets")) {
                        if (!Array.isArray(message.targets))
                            return "targets: array expected";
                        for (var i = 0; i < message.targets.length; ++i)
                            switch (message.targets[i]) {
                            default:
                                return "targets: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 7:
                            case 8:
                            case 9:
                                break;
                            }
                    }
                    if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) {
                        if (!Array.isArray(message.editionDefaults))
                            return "editionDefaults: array expected";
                        for (var i = 0; i < message.editionDefaults.length; ++i) {
                            var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]);
                            if (error)
                                return "editionDefaults." + error;
                        }
                    }
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) {
                        if (!Array.isArray(message[".google.api.fieldBehavior"]))
                            return ".google.api.fieldBehavior: array expected";
                        for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i)
                            switch (message[".google.api.fieldBehavior"][i]) {
                            default:
                                return ".google.api.fieldBehavior: enum value[] expected";
                            case 0:
                            case 1:
                            case 2:
                            case 3:
                            case 4:
                            case 5:
                            case 6:
                            case 7:
                            case 8:
                                break;
                            }
                    }
                    if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) {
                        var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]);
                        if (error)
                            return ".google.api.resourceReference." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FieldOptions} FieldOptions
                 */
                FieldOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FieldOptions)
                        return object;
                    var message = new $root.google.protobuf.FieldOptions();
                    switch (object.ctype) {
                    default:
                        if (typeof object.ctype === "number") {
                            message.ctype = object.ctype;
                            break;
                        }
                        break;
                    case "STRING":
                    case 0:
                        message.ctype = 0;
                        break;
                    case "CORD":
                    case 1:
                        message.ctype = 1;
                        break;
                    case "STRING_PIECE":
                    case 2:
                        message.ctype = 2;
                        break;
                    }
                    if (object.packed != null)
                        message.packed = Boolean(object.packed);
                    switch (object.jstype) {
                    default:
                        if (typeof object.jstype === "number") {
                            message.jstype = object.jstype;
                            break;
                        }
                        break;
                    case "JS_NORMAL":
                    case 0:
                        message.jstype = 0;
                        break;
                    case "JS_STRING":
                    case 1:
                        message.jstype = 1;
                        break;
                    case "JS_NUMBER":
                    case 2:
                        message.jstype = 2;
                        break;
                    }
                    if (object.lazy != null)
                        message.lazy = Boolean(object.lazy);
                    if (object.unverifiedLazy != null)
                        message.unverifiedLazy = Boolean(object.unverifiedLazy);
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.weak != null)
                        message.weak = Boolean(object.weak);
                    if (object.debugRedact != null)
                        message.debugRedact = Boolean(object.debugRedact);
                    switch (object.retention) {
                    default:
                        if (typeof object.retention === "number") {
                            message.retention = object.retention;
                            break;
                        }
                        break;
                    case "RETENTION_UNKNOWN":
                    case 0:
                        message.retention = 0;
                        break;
                    case "RETENTION_RUNTIME":
                    case 1:
                        message.retention = 1;
                        break;
                    case "RETENTION_SOURCE":
                    case 2:
                        message.retention = 2;
                        break;
                    }
                    if (object.targets) {
                        if (!Array.isArray(object.targets))
                            throw TypeError(".google.protobuf.FieldOptions.targets: array expected");
                        message.targets = [];
                        for (var i = 0; i < object.targets.length; ++i)
                            switch (object.targets[i]) {
                            default:
                                if (typeof object.targets[i] === "number") {
                                    message.targets[i] = object.targets[i];
                                    break;
                                }
                            case "TARGET_TYPE_UNKNOWN":
                            case 0:
                                message.targets[i] = 0;
                                break;
                            case "TARGET_TYPE_FILE":
                            case 1:
                                message.targets[i] = 1;
                                break;
                            case "TARGET_TYPE_EXTENSION_RANGE":
                            case 2:
                                message.targets[i] = 2;
                                break;
                            case "TARGET_TYPE_MESSAGE":
                            case 3:
                                message.targets[i] = 3;
                                break;
                            case "TARGET_TYPE_FIELD":
                            case 4:
                                message.targets[i] = 4;
                                break;
                            case "TARGET_TYPE_ONEOF":
                            case 5:
                                message.targets[i] = 5;
                                break;
                            case "TARGET_TYPE_ENUM":
                            case 6:
                                message.targets[i] = 6;
                                break;
                            case "TARGET_TYPE_ENUM_ENTRY":
                            case 7:
                                message.targets[i] = 7;
                                break;
                            case "TARGET_TYPE_SERVICE":
                            case 8:
                                message.targets[i] = 8;
                                break;
                            case "TARGET_TYPE_METHOD":
                            case 9:
                                message.targets[i] = 9;
                                break;
                            }
                    }
                    if (object.editionDefaults) {
                        if (!Array.isArray(object.editionDefaults))
                            throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected");
                        message.editionDefaults = [];
                        for (var i = 0; i < object.editionDefaults.length; ++i) {
                            if (typeof object.editionDefaults[i] !== "object")
                                throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected");
                            message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]);
                        }
                    }
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.FieldOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object[".google.api.fieldBehavior"]) {
                        if (!Array.isArray(object[".google.api.fieldBehavior"]))
                            throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");
                        message[".google.api.fieldBehavior"] = [];
                        for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i)
                            switch (object[".google.api.fieldBehavior"][i]) {
                            default:
                                if (typeof object[".google.api.fieldBehavior"][i] === "number") {
                                    message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i];
                                    break;
                                }
                            case "FIELD_BEHAVIOR_UNSPECIFIED":
                            case 0:
                                message[".google.api.fieldBehavior"][i] = 0;
                                break;
                            case "OPTIONAL":
                            case 1:
                                message[".google.api.fieldBehavior"][i] = 1;
                                break;
                            case "REQUIRED":
                            case 2:
                                message[".google.api.fieldBehavior"][i] = 2;
                                break;
                            case "OUTPUT_ONLY":
                            case 3:
                                message[".google.api.fieldBehavior"][i] = 3;
                                break;
                            case "INPUT_ONLY":
                            case 4:
                                message[".google.api.fieldBehavior"][i] = 4;
                                break;
                            case "IMMUTABLE":
                            case 5:
                                message[".google.api.fieldBehavior"][i] = 5;
                                break;
                            case "UNORDERED_LIST":
                            case 6:
                                message[".google.api.fieldBehavior"][i] = 6;
                                break;
                            case "NON_EMPTY_DEFAULT":
                            case 7:
                                message[".google.api.fieldBehavior"][i] = 7;
                                break;
                            case "IDENTIFIER":
                            case 8:
                                message[".google.api.fieldBehavior"][i] = 8;
                                break;
                            }
                    }
                    if (object[".google.api.resourceReference"] != null) {
                        if (typeof object[".google.api.resourceReference"] !== "object")
                            throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected");
                        message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FieldOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {google.protobuf.FieldOptions} message FieldOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FieldOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.targets = [];
                        object.editionDefaults = [];
                        object.uninterpretedOption = [];
                        object[".google.api.fieldBehavior"] = [];
                    }
                    if (options.defaults) {
                        object.ctype = options.enums === String ? "STRING" : 0;
                        object.packed = false;
                        object.deprecated = false;
                        object.lazy = false;
                        object.jstype = options.enums === String ? "JS_NORMAL" : 0;
                        object.weak = false;
                        object.unverifiedLazy = false;
                        object.debugRedact = false;
                        object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0;
                        object.features = null;
                        object[".google.api.resourceReference"] = null;
                    }
                    if (message.ctype != null && message.hasOwnProperty("ctype"))
                        object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype;
                    if (message.packed != null && message.hasOwnProperty("packed"))
                        object.packed = message.packed;
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.lazy != null && message.hasOwnProperty("lazy"))
                        object.lazy = message.lazy;
                    if (message.jstype != null && message.hasOwnProperty("jstype"))
                        object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype;
                    if (message.weak != null && message.hasOwnProperty("weak"))
                        object.weak = message.weak;
                    if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy"))
                        object.unverifiedLazy = message.unverifiedLazy;
                    if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
                        object.debugRedact = message.debugRedact;
                    if (message.retention != null && message.hasOwnProperty("retention"))
                        object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention;
                    if (message.targets && message.targets.length) {
                        object.targets = [];
                        for (var j = 0; j < message.targets.length; ++j)
                            object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j];
                    }
                    if (message.editionDefaults && message.editionDefaults.length) {
                        object.editionDefaults = [];
                        for (var j = 0; j < message.editionDefaults.length; ++j)
                            object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options);
                    }
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) {
                        object[".google.api.fieldBehavior"] = [];
                        for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j)
                            object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j];
                    }
                    if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference"))
                        object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options);
                    return object;
                };
    
                /**
                 * Converts this FieldOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FieldOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FieldOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FieldOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.FieldOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FieldOptions";
                };
    
                /**
                 * CType enum.
                 * @name google.protobuf.FieldOptions.CType
                 * @enum {number}
                 * @property {number} STRING=0 STRING value
                 * @property {number} CORD=1 CORD value
                 * @property {number} STRING_PIECE=2 STRING_PIECE value
                 */
                FieldOptions.CType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "STRING"] = 0;
                    values[valuesById[1] = "CORD"] = 1;
                    values[valuesById[2] = "STRING_PIECE"] = 2;
                    return values;
                })();
    
                /**
                 * JSType enum.
                 * @name google.protobuf.FieldOptions.JSType
                 * @enum {number}
                 * @property {number} JS_NORMAL=0 JS_NORMAL value
                 * @property {number} JS_STRING=1 JS_STRING value
                 * @property {number} JS_NUMBER=2 JS_NUMBER value
                 */
                FieldOptions.JSType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "JS_NORMAL"] = 0;
                    values[valuesById[1] = "JS_STRING"] = 1;
                    values[valuesById[2] = "JS_NUMBER"] = 2;
                    return values;
                })();
    
                /**
                 * OptionRetention enum.
                 * @name google.protobuf.FieldOptions.OptionRetention
                 * @enum {number}
                 * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value
                 * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value
                 * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value
                 */
                FieldOptions.OptionRetention = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "RETENTION_UNKNOWN"] = 0;
                    values[valuesById[1] = "RETENTION_RUNTIME"] = 1;
                    values[valuesById[2] = "RETENTION_SOURCE"] = 2;
                    return values;
                })();
    
                /**
                 * OptionTargetType enum.
                 * @name google.protobuf.FieldOptions.OptionTargetType
                 * @enum {number}
                 * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value
                 * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value
                 * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value
                 * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value
                 * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value
                 * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value
                 * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value
                 * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value
                 * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value
                 * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value
                 */
                FieldOptions.OptionTargetType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0;
                    values[valuesById[1] = "TARGET_TYPE_FILE"] = 1;
                    values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2;
                    values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3;
                    values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4;
                    values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5;
                    values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6;
                    values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7;
                    values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8;
                    values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9;
                    return values;
                })();
    
                FieldOptions.EditionDefault = (function() {
    
                    /**
                     * Properties of an EditionDefault.
                     * @memberof google.protobuf.FieldOptions
                     * @interface IEditionDefault
                     * @property {google.protobuf.Edition|null} [edition] EditionDefault edition
                     * @property {string|null} [value] EditionDefault value
                     */
    
                    /**
                     * Constructs a new EditionDefault.
                     * @memberof google.protobuf.FieldOptions
                     * @classdesc Represents an EditionDefault.
                     * @implements IEditionDefault
                     * @constructor
                     * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set
                     */
                    function EditionDefault(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * EditionDefault edition.
                     * @member {google.protobuf.Edition} edition
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @instance
                     */
                    EditionDefault.prototype.edition = 0;
    
                    /**
                     * EditionDefault value.
                     * @member {string} value
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @instance
                     */
                    EditionDefault.prototype.value = "";
    
                    /**
                     * Creates a new EditionDefault instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set
                     * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance
                     */
                    EditionDefault.create = function create(properties) {
                        return new EditionDefault(properties);
                    };
    
                    /**
                     * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    EditionDefault.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.value);
                        if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
                            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    EditionDefault.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes an EditionDefault message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    EditionDefault.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 3: {
                                    message.edition = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.value = reader.string();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes an EditionDefault message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    EditionDefault.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies an EditionDefault message.
                     * @function verify
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    EditionDefault.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.edition != null && message.hasOwnProperty("edition"))
                            switch (message.edition) {
                            default:
                                return "edition: enum value expected";
                            case 0:
                            case 998:
                            case 999:
                            case 1000:
                            case 1001:
                            case 1:
                            case 2:
                            case 99997:
                            case 99998:
                            case 99999:
                            case 2147483647:
                                break;
                            }
                        if (message.value != null && message.hasOwnProperty("value"))
                            if (!$util.isString(message.value))
                                return "value: string expected";
                        return null;
                    };
    
                    /**
                     * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault
                     */
                    EditionDefault.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault)
                            return object;
                        var message = new $root.google.protobuf.FieldOptions.EditionDefault();
                        switch (object.edition) {
                        default:
                            if (typeof object.edition === "number") {
                                message.edition = object.edition;
                                break;
                            }
                            break;
                        case "EDITION_UNKNOWN":
                        case 0:
                            message.edition = 0;
                            break;
                        case "EDITION_PROTO2":
                        case 998:
                            message.edition = 998;
                            break;
                        case "EDITION_PROTO3":
                        case 999:
                            message.edition = 999;
                            break;
                        case "EDITION_2023":
                        case 1000:
                            message.edition = 1000;
                            break;
                        case "EDITION_2024":
                        case 1001:
                            message.edition = 1001;
                            break;
                        case "EDITION_1_TEST_ONLY":
                        case 1:
                            message.edition = 1;
                            break;
                        case "EDITION_2_TEST_ONLY":
                        case 2:
                            message.edition = 2;
                            break;
                        case "EDITION_99997_TEST_ONLY":
                        case 99997:
                            message.edition = 99997;
                            break;
                        case "EDITION_99998_TEST_ONLY":
                        case 99998:
                            message.edition = 99998;
                            break;
                        case "EDITION_99999_TEST_ONLY":
                        case 99999:
                            message.edition = 99999;
                            break;
                        case "EDITION_MAX":
                        case 2147483647:
                            message.edition = 2147483647;
                            break;
                        }
                        if (object.value != null)
                            message.value = String(object.value);
                        return message;
                    };
    
                    /**
                     * Creates a plain object from an EditionDefault message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    EditionDefault.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.value = "";
                            object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0;
                        }
                        if (message.value != null && message.hasOwnProperty("value"))
                            object.value = message.value;
                        if (message.edition != null && message.hasOwnProperty("edition"))
                            object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition;
                        return object;
                    };
    
                    /**
                     * Converts this EditionDefault to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    EditionDefault.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for EditionDefault
                     * @function getTypeUrl
                     * @memberof google.protobuf.FieldOptions.EditionDefault
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault";
                    };
    
                    return EditionDefault;
                })();
    
                return FieldOptions;
            })();
    
            protobuf.OneofOptions = (function() {
    
                /**
                 * Properties of an OneofOptions.
                 * @memberof google.protobuf
                 * @interface IOneofOptions
                 * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] OneofOptions uninterpretedOption
                 */
    
                /**
                 * Constructs a new OneofOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents an OneofOptions.
                 * @implements IOneofOptions
                 * @constructor
                 * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
                 */
                function OneofOptions(properties) {
                    this.uninterpretedOption = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * OneofOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.OneofOptions
                 * @instance
                 */
                OneofOptions.prototype.features = null;
    
                /**
                 * OneofOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.OneofOptions
                 * @instance
                 */
                OneofOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * Creates a new OneofOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {google.protobuf.IOneofOptions=} [properties] Properties to set
                 * @returns {google.protobuf.OneofOptions} OneofOptions instance
                 */
                OneofOptions.create = function create(properties) {
                    return new OneofOptions(properties);
                };
    
                /**
                 * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OneofOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OneofOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an OneofOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.OneofOptions} OneofOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OneofOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an OneofOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.OneofOptions} OneofOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OneofOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an OneofOptions message.
                 * @function verify
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                OneofOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.OneofOptions} OneofOptions
                 */
                OneofOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.OneofOptions)
                        return object;
                    var message = new $root.google.protobuf.OneofOptions();
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.OneofOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an OneofOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {google.protobuf.OneofOptions} message OneofOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                OneofOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.uninterpretedOption = [];
                    if (options.defaults)
                        object.features = null;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this OneofOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.OneofOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                OneofOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for OneofOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.OneofOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.OneofOptions";
                };
    
                return OneofOptions;
            })();
    
            protobuf.EnumOptions = (function() {
    
                /**
                 * Properties of an EnumOptions.
                 * @memberof google.protobuf
                 * @interface IEnumOptions
                 * @property {boolean|null} [allowAlias] EnumOptions allowAlias
                 * @property {boolean|null} [deprecated] EnumOptions deprecated
                 * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts
                 * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumOptions uninterpretedOption
                 */
    
                /**
                 * Constructs a new EnumOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents an EnumOptions.
                 * @implements IEnumOptions
                 * @constructor
                 * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
                 */
                function EnumOptions(properties) {
                    this.uninterpretedOption = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * EnumOptions allowAlias.
                 * @member {boolean} allowAlias
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 */
                EnumOptions.prototype.allowAlias = false;
    
                /**
                 * EnumOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 */
                EnumOptions.prototype.deprecated = false;
    
                /**
                 * EnumOptions deprecatedLegacyJsonFieldConflicts.
                 * @member {boolean} deprecatedLegacyJsonFieldConflicts
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 */
                EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false;
    
                /**
                 * EnumOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 */
                EnumOptions.prototype.features = null;
    
                /**
                 * EnumOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 */
                EnumOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * Creates a new EnumOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {google.protobuf.IEnumOptions=} [properties] Properties to set
                 * @returns {google.protobuf.EnumOptions} EnumOptions instance
                 */
                EnumOptions.create = function create(properties) {
                    return new EnumOptions(properties);
                };
    
                /**
                 * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias"))
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias);
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated);
                    if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts"))
                        writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an EnumOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.EnumOptions} EnumOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 2: {
                                message.allowAlias = reader.bool();
                                break;
                            }
                        case 3: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 6: {
                                message.deprecatedLegacyJsonFieldConflicts = reader.bool();
                                break;
                            }
                        case 7: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an EnumOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.EnumOptions} EnumOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an EnumOptions message.
                 * @function verify
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnumOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
                        if (typeof message.allowAlias !== "boolean")
                            return "allowAlias: boolean expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
                        if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean")
                            return "deprecatedLegacyJsonFieldConflicts: boolean expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.EnumOptions} EnumOptions
                 */
                EnumOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.EnumOptions)
                        return object;
                    var message = new $root.google.protobuf.EnumOptions();
                    if (object.allowAlias != null)
                        message.allowAlias = Boolean(object.allowAlias);
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.deprecatedLegacyJsonFieldConflicts != null)
                        message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts);
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.EnumOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an EnumOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {google.protobuf.EnumOptions} message EnumOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnumOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.uninterpretedOption = [];
                    if (options.defaults) {
                        object.allowAlias = false;
                        object.deprecated = false;
                        object.deprecatedLegacyJsonFieldConflicts = false;
                        object.features = null;
                    }
                    if (message.allowAlias != null && message.hasOwnProperty("allowAlias"))
                        object.allowAlias = message.allowAlias;
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts"))
                        object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this EnumOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.EnumOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnumOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for EnumOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.EnumOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.EnumOptions";
                };
    
                return EnumOptions;
            })();
    
            protobuf.EnumValueOptions = (function() {
    
                /**
                 * Properties of an EnumValueOptions.
                 * @memberof google.protobuf
                 * @interface IEnumValueOptions
                 * @property {boolean|null} [deprecated] EnumValueOptions deprecated
                 * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features
                 * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] EnumValueOptions uninterpretedOption
                 */
    
                /**
                 * Constructs a new EnumValueOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents an EnumValueOptions.
                 * @implements IEnumValueOptions
                 * @constructor
                 * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
                 */
                function EnumValueOptions(properties) {
                    this.uninterpretedOption = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * EnumValueOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.EnumValueOptions
                 * @instance
                 */
                EnumValueOptions.prototype.deprecated = false;
    
                /**
                 * EnumValueOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.EnumValueOptions
                 * @instance
                 */
                EnumValueOptions.prototype.features = null;
    
                /**
                 * EnumValueOptions debugRedact.
                 * @member {boolean} debugRedact
                 * @memberof google.protobuf.EnumValueOptions
                 * @instance
                 */
                EnumValueOptions.prototype.debugRedact = false;
    
                /**
                 * EnumValueOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.EnumValueOptions
                 * @instance
                 */
                EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * Creates a new EnumValueOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set
                 * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance
                 */
                EnumValueOptions.create = function create(properties) {
                    return new EnumValueOptions(properties);
                };
    
                /**
                 * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumValueOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact);
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an EnumValueOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumValueOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 2: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.debugRedact = reader.bool();
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                EnumValueOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an EnumValueOptions message.
                 * @function verify
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                EnumValueOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
                        if (typeof message.debugRedact !== "boolean")
                            return "debugRedact: boolean expected";
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.EnumValueOptions} EnumValueOptions
                 */
                EnumValueOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.EnumValueOptions)
                        return object;
                    var message = new $root.google.protobuf.EnumValueOptions();
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.EnumValueOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.debugRedact != null)
                        message.debugRedact = Boolean(object.debugRedact);
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {google.protobuf.EnumValueOptions} message EnumValueOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                EnumValueOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.uninterpretedOption = [];
                    if (options.defaults) {
                        object.deprecated = false;
                        object.features = null;
                        object.debugRedact = false;
                    }
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.debugRedact != null && message.hasOwnProperty("debugRedact"))
                        object.debugRedact = message.debugRedact;
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this EnumValueOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.EnumValueOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                EnumValueOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for EnumValueOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.EnumValueOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.EnumValueOptions";
                };
    
                return EnumValueOptions;
            })();
    
            protobuf.ServiceOptions = (function() {
    
                /**
                 * Properties of a ServiceOptions.
                 * @memberof google.protobuf
                 * @interface IServiceOptions
                 * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features
                 * @property {boolean|null} [deprecated] ServiceOptions deprecated
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] ServiceOptions uninterpretedOption
                 * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost
                 * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes
                 */
    
                /**
                 * Constructs a new ServiceOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents a ServiceOptions.
                 * @implements IServiceOptions
                 * @constructor
                 * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
                 */
                function ServiceOptions(properties) {
                    this.uninterpretedOption = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ServiceOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 */
                ServiceOptions.prototype.features = null;
    
                /**
                 * ServiceOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 */
                ServiceOptions.prototype.deprecated = false;
    
                /**
                 * ServiceOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 */
                ServiceOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * ServiceOptions .google.api.defaultHost.
                 * @member {string} .google.api.defaultHost
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 */
                ServiceOptions.prototype[".google.api.defaultHost"] = "";
    
                /**
                 * ServiceOptions .google.api.oauthScopes.
                 * @member {string} .google.api.oauthScopes
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 */
                ServiceOptions.prototype[".google.api.oauthScopes"] = "";
    
                /**
                 * Creates a new ServiceOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {google.protobuf.IServiceOptions=} [properties] Properties to set
                 * @returns {google.protobuf.ServiceOptions} ServiceOptions instance
                 */
                ServiceOptions.create = function create(properties) {
                    return new ServiceOptions(properties);
                };
    
                /**
                 * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ServiceOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost"))
                        writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]);
                    if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes"))
                        writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]);
                    return writer;
                };
    
                /**
                 * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ServiceOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.ServiceOptions} ServiceOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ServiceOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 34: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 33: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 1049: {
                                message[".google.api.defaultHost"] = reader.string();
                                break;
                            }
                        case 1050: {
                                message[".google.api.oauthScopes"] = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ServiceOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.ServiceOptions} ServiceOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ServiceOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ServiceOptions message.
                 * @function verify
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ServiceOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
                        if (!$util.isString(message[".google.api.defaultHost"]))
                            return ".google.api.defaultHost: string expected";
                    if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
                        if (!$util.isString(message[".google.api.oauthScopes"]))
                            return ".google.api.oauthScopes: string expected";
                    return null;
                };
    
                /**
                 * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.ServiceOptions} ServiceOptions
                 */
                ServiceOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.ServiceOptions)
                        return object;
                    var message = new $root.google.protobuf.ServiceOptions();
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.ServiceOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object[".google.api.defaultHost"] != null)
                        message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]);
                    if (object[".google.api.oauthScopes"] != null)
                        message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]);
                    return message;
                };
    
                /**
                 * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {google.protobuf.ServiceOptions} message ServiceOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ServiceOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.uninterpretedOption = [];
                    if (options.defaults) {
                        object.deprecated = false;
                        object.features = null;
                        object[".google.api.defaultHost"] = "";
                        object[".google.api.oauthScopes"] = "";
                    }
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost"))
                        object[".google.api.defaultHost"] = message[".google.api.defaultHost"];
                    if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes"))
                        object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"];
                    return object;
                };
    
                /**
                 * Converts this ServiceOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.ServiceOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ServiceOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ServiceOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.ServiceOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.ServiceOptions";
                };
    
                return ServiceOptions;
            })();
    
            protobuf.MethodOptions = (function() {
    
                /**
                 * Properties of a MethodOptions.
                 * @memberof google.protobuf
                 * @interface IMethodOptions
                 * @property {boolean|null} [deprecated] MethodOptions deprecated
                 * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel
                 * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features
                 * @property {Array.<google.protobuf.IUninterpretedOption>|null} [uninterpretedOption] MethodOptions uninterpretedOption
                 * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http
                 * @property {Array.<string>|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature
                 * @property {google.longrunning.IOperationInfo|null} [".google.longrunning.operationInfo"] MethodOptions .google.longrunning.operationInfo
                 */
    
                /**
                 * Constructs a new MethodOptions.
                 * @memberof google.protobuf
                 * @classdesc Represents a MethodOptions.
                 * @implements IMethodOptions
                 * @constructor
                 * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
                 */
                function MethodOptions(properties) {
                    this.uninterpretedOption = [];
                    this[".google.api.methodSignature"] = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * MethodOptions deprecated.
                 * @member {boolean} deprecated
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype.deprecated = false;
    
                /**
                 * MethodOptions idempotencyLevel.
                 * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype.idempotencyLevel = 0;
    
                /**
                 * MethodOptions features.
                 * @member {google.protobuf.IFeatureSet|null|undefined} features
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype.features = null;
    
                /**
                 * MethodOptions uninterpretedOption.
                 * @member {Array.<google.protobuf.IUninterpretedOption>} uninterpretedOption
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype.uninterpretedOption = $util.emptyArray;
    
                /**
                 * MethodOptions .google.api.http.
                 * @member {google.api.IHttpRule|null|undefined} .google.api.http
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype[".google.api.http"] = null;
    
                /**
                 * MethodOptions .google.api.methodSignature.
                 * @member {Array.<string>} .google.api.methodSignature
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray;
    
                /**
                 * MethodOptions .google.longrunning.operationInfo.
                 * @member {google.longrunning.IOperationInfo|null|undefined} .google.longrunning.operationInfo
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 */
                MethodOptions.prototype[".google.longrunning.operationInfo"] = null;
    
                /**
                 * Creates a new MethodOptions instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {google.protobuf.IMethodOptions=} [properties] Properties to set
                 * @returns {google.protobuf.MethodOptions} MethodOptions instance
                 */
                MethodOptions.create = function create(properties) {
                    return new MethodOptions(properties);
                };
    
                /**
                 * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodOptions.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated"))
                        writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated);
                    if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel"))
                        writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel);
                    if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                        $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim();
                    if (message.uninterpretedOption != null && message.uninterpretedOption.length)
                        for (var i = 0; i < message.uninterpretedOption.length; ++i)
                            $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim();
                    if (message[".google.longrunning.operationInfo"] != null && Object.hasOwnProperty.call(message, ".google.longrunning.operationInfo"))
                        $root.google.longrunning.OperationInfo.encode(message[".google.longrunning.operationInfo"], writer.uint32(/* id 1049, wireType 2 =*/8394).fork()).ldelim();
                    if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length)
                        for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
                            writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]);
                    if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http"))
                        $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                MethodOptions.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a MethodOptions message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.MethodOptions} MethodOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodOptions.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 33: {
                                message.deprecated = reader.bool();
                                break;
                            }
                        case 34: {
                                message.idempotencyLevel = reader.int32();
                                break;
                            }
                        case 35: {
                                message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                break;
                            }
                        case 999: {
                                if (!(message.uninterpretedOption && message.uninterpretedOption.length))
                                    message.uninterpretedOption = [];
                                message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32()));
                                break;
                            }
                        case 72295728: {
                                message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32());
                                break;
                            }
                        case 1051: {
                                if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length))
                                    message[".google.api.methodSignature"] = [];
                                message[".google.api.methodSignature"].push(reader.string());
                                break;
                            }
                        case 1049: {
                                message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a MethodOptions message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.MethodOptions} MethodOptions
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                MethodOptions.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a MethodOptions message.
                 * @function verify
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                MethodOptions.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        if (typeof message.deprecated !== "boolean")
                            return "deprecated: boolean expected";
                    if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
                        switch (message.idempotencyLevel) {
                        default:
                            return "idempotencyLevel: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.features != null && message.hasOwnProperty("features")) {
                        var error = $root.google.protobuf.FeatureSet.verify(message.features);
                        if (error)
                            return "features." + error;
                    }
                    if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) {
                        if (!Array.isArray(message.uninterpretedOption))
                            return "uninterpretedOption: array expected";
                        for (var i = 0; i < message.uninterpretedOption.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]);
                            if (error)
                                return "uninterpretedOption." + error;
                        }
                    }
                    if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) {
                        var error = $root.google.api.HttpRule.verify(message[".google.api.http"]);
                        if (error)
                            return ".google.api.http." + error;
                    }
                    if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) {
                        if (!Array.isArray(message[".google.api.methodSignature"]))
                            return ".google.api.methodSignature: array expected";
                        for (var i = 0; i < message[".google.api.methodSignature"].length; ++i)
                            if (!$util.isString(message[".google.api.methodSignature"][i]))
                                return ".google.api.methodSignature: string[] expected";
                    }
                    if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo")) {
                        var error = $root.google.longrunning.OperationInfo.verify(message[".google.longrunning.operationInfo"]);
                        if (error)
                            return ".google.longrunning.operationInfo." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.MethodOptions} MethodOptions
                 */
                MethodOptions.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.MethodOptions)
                        return object;
                    var message = new $root.google.protobuf.MethodOptions();
                    if (object.deprecated != null)
                        message.deprecated = Boolean(object.deprecated);
                    switch (object.idempotencyLevel) {
                    default:
                        if (typeof object.idempotencyLevel === "number") {
                            message.idempotencyLevel = object.idempotencyLevel;
                            break;
                        }
                        break;
                    case "IDEMPOTENCY_UNKNOWN":
                    case 0:
                        message.idempotencyLevel = 0;
                        break;
                    case "NO_SIDE_EFFECTS":
                    case 1:
                        message.idempotencyLevel = 1;
                        break;
                    case "IDEMPOTENT":
                    case 2:
                        message.idempotencyLevel = 2;
                        break;
                    }
                    if (object.features != null) {
                        if (typeof object.features !== "object")
                            throw TypeError(".google.protobuf.MethodOptions.features: object expected");
                        message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                    }
                    if (object.uninterpretedOption) {
                        if (!Array.isArray(object.uninterpretedOption))
                            throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");
                        message.uninterpretedOption = [];
                        for (var i = 0; i < object.uninterpretedOption.length; ++i) {
                            if (typeof object.uninterpretedOption[i] !== "object")
                                throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");
                            message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]);
                        }
                    }
                    if (object[".google.api.http"] != null) {
                        if (typeof object[".google.api.http"] !== "object")
                            throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");
                        message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]);
                    }
                    if (object[".google.api.methodSignature"]) {
                        if (!Array.isArray(object[".google.api.methodSignature"]))
                            throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");
                        message[".google.api.methodSignature"] = [];
                        for (var i = 0; i < object[".google.api.methodSignature"].length; ++i)
                            message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]);
                    }
                    if (object[".google.longrunning.operationInfo"] != null) {
                        if (typeof object[".google.longrunning.operationInfo"] !== "object")
                            throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");
                        message[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.fromObject(object[".google.longrunning.operationInfo"]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a MethodOptions message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {google.protobuf.MethodOptions} message MethodOptions
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                MethodOptions.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults) {
                        object.uninterpretedOption = [];
                        object[".google.api.methodSignature"] = [];
                    }
                    if (options.defaults) {
                        object.deprecated = false;
                        object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0;
                        object.features = null;
                        object[".google.longrunning.operationInfo"] = null;
                        object[".google.api.http"] = null;
                    }
                    if (message.deprecated != null && message.hasOwnProperty("deprecated"))
                        object.deprecated = message.deprecated;
                    if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel"))
                        object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel;
                    if (message.features != null && message.hasOwnProperty("features"))
                        object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                    if (message.uninterpretedOption && message.uninterpretedOption.length) {
                        object.uninterpretedOption = [];
                        for (var j = 0; j < message.uninterpretedOption.length; ++j)
                            object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options);
                    }
                    if (message[".google.longrunning.operationInfo"] != null && message.hasOwnProperty(".google.longrunning.operationInfo"))
                        object[".google.longrunning.operationInfo"] = $root.google.longrunning.OperationInfo.toObject(message[".google.longrunning.operationInfo"], options);
                    if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) {
                        object[".google.api.methodSignature"] = [];
                        for (var j = 0; j < message[".google.api.methodSignature"].length; ++j)
                            object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j];
                    }
                    if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http"))
                        object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options);
                    return object;
                };
    
                /**
                 * Converts this MethodOptions to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.MethodOptions
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                MethodOptions.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for MethodOptions
                 * @function getTypeUrl
                 * @memberof google.protobuf.MethodOptions
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.MethodOptions";
                };
    
                /**
                 * IdempotencyLevel enum.
                 * @name google.protobuf.MethodOptions.IdempotencyLevel
                 * @enum {number}
                 * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value
                 * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value
                 * @property {number} IDEMPOTENT=2 IDEMPOTENT value
                 */
                MethodOptions.IdempotencyLevel = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0;
                    values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1;
                    values[valuesById[2] = "IDEMPOTENT"] = 2;
                    return values;
                })();
    
                return MethodOptions;
            })();
    
            protobuf.UninterpretedOption = (function() {
    
                /**
                 * Properties of an UninterpretedOption.
                 * @memberof google.protobuf
                 * @interface IUninterpretedOption
                 * @property {Array.<google.protobuf.UninterpretedOption.INamePart>|null} [name] UninterpretedOption name
                 * @property {string|null} [identifierValue] UninterpretedOption identifierValue
                 * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue
                 * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue
                 * @property {number|null} [doubleValue] UninterpretedOption doubleValue
                 * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue
                 * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue
                 */
    
                /**
                 * Constructs a new UninterpretedOption.
                 * @memberof google.protobuf
                 * @classdesc Represents an UninterpretedOption.
                 * @implements IUninterpretedOption
                 * @constructor
                 * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
                 */
                function UninterpretedOption(properties) {
                    this.name = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * UninterpretedOption name.
                 * @member {Array.<google.protobuf.UninterpretedOption.INamePart>} name
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.name = $util.emptyArray;
    
                /**
                 * UninterpretedOption identifierValue.
                 * @member {string} identifierValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.identifierValue = "";
    
                /**
                 * UninterpretedOption positiveIntValue.
                 * @member {number|Long} positiveIntValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                /**
                 * UninterpretedOption negativeIntValue.
                 * @member {number|Long} negativeIntValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
    
                /**
                 * UninterpretedOption doubleValue.
                 * @member {number} doubleValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.doubleValue = 0;
    
                /**
                 * UninterpretedOption stringValue.
                 * @member {Uint8Array} stringValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.stringValue = $util.newBuffer([]);
    
                /**
                 * UninterpretedOption aggregateValue.
                 * @member {string} aggregateValue
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 */
                UninterpretedOption.prototype.aggregateValue = "";
    
                /**
                 * Creates a new UninterpretedOption instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set
                 * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance
                 */
                UninterpretedOption.create = function create(properties) {
                    return new UninterpretedOption(properties);
                };
    
                /**
                 * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UninterpretedOption.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && message.name.length)
                        for (var i = 0; i < message.name.length; ++i)
                            $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue);
                    if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue"))
                        writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue);
                    if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue"))
                        writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue);
                    if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue"))
                        writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue);
                    if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue"))
                        writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue);
                    if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue"))
                        writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue);
                    return writer;
                };
    
                /**
                 * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an UninterpretedOption message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UninterpretedOption.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 2: {
                                if (!(message.name && message.name.length))
                                    message.name = [];
                                message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32()));
                                break;
                            }
                        case 3: {
                                message.identifierValue = reader.string();
                                break;
                            }
                        case 4: {
                                message.positiveIntValue = reader.uint64();
                                break;
                            }
                        case 5: {
                                message.negativeIntValue = reader.int64();
                                break;
                            }
                        case 6: {
                                message.doubleValue = reader.double();
                                break;
                            }
                        case 7: {
                                message.stringValue = reader.bytes();
                                break;
                            }
                        case 8: {
                                message.aggregateValue = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UninterpretedOption.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an UninterpretedOption message.
                 * @function verify
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                UninterpretedOption.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name")) {
                        if (!Array.isArray(message.name))
                            return "name: array expected";
                        for (var i = 0; i < message.name.length; ++i) {
                            var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]);
                            if (error)
                                return "name." + error;
                        }
                    }
                    if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
                        if (!$util.isString(message.identifierValue))
                            return "identifierValue: string expected";
                    if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
                        if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high)))
                            return "positiveIntValue: integer|Long expected";
                    if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
                        if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high)))
                            return "negativeIntValue: integer|Long expected";
                    if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
                        if (typeof message.doubleValue !== "number")
                            return "doubleValue: number expected";
                    if (message.stringValue != null && message.hasOwnProperty("stringValue"))
                        if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue)))
                            return "stringValue: buffer expected";
                    if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
                        if (!$util.isString(message.aggregateValue))
                            return "aggregateValue: string expected";
                    return null;
                };
    
                /**
                 * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.UninterpretedOption} UninterpretedOption
                 */
                UninterpretedOption.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.UninterpretedOption)
                        return object;
                    var message = new $root.google.protobuf.UninterpretedOption();
                    if (object.name) {
                        if (!Array.isArray(object.name))
                            throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");
                        message.name = [];
                        for (var i = 0; i < object.name.length; ++i) {
                            if (typeof object.name[i] !== "object")
                                throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");
                            message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]);
                        }
                    }
                    if (object.identifierValue != null)
                        message.identifierValue = String(object.identifierValue);
                    if (object.positiveIntValue != null)
                        if ($util.Long)
                            (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true;
                        else if (typeof object.positiveIntValue === "string")
                            message.positiveIntValue = parseInt(object.positiveIntValue, 10);
                        else if (typeof object.positiveIntValue === "number")
                            message.positiveIntValue = object.positiveIntValue;
                        else if (typeof object.positiveIntValue === "object")
                            message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true);
                    if (object.negativeIntValue != null)
                        if ($util.Long)
                            (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false;
                        else if (typeof object.negativeIntValue === "string")
                            message.negativeIntValue = parseInt(object.negativeIntValue, 10);
                        else if (typeof object.negativeIntValue === "number")
                            message.negativeIntValue = object.negativeIntValue;
                        else if (typeof object.negativeIntValue === "object")
                            message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber();
                    if (object.doubleValue != null)
                        message.doubleValue = Number(object.doubleValue);
                    if (object.stringValue != null)
                        if (typeof object.stringValue === "string")
                            $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0);
                        else if (object.stringValue.length >= 0)
                            message.stringValue = object.stringValue;
                    if (object.aggregateValue != null)
                        message.aggregateValue = String(object.aggregateValue);
                    return message;
                };
    
                /**
                 * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {google.protobuf.UninterpretedOption} message UninterpretedOption
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                UninterpretedOption.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.name = [];
                    if (options.defaults) {
                        object.identifierValue = "";
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, true);
                            object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.positiveIntValue = options.longs === String ? "0" : 0;
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.negativeIntValue = options.longs === String ? "0" : 0;
                        object.doubleValue = 0;
                        if (options.bytes === String)
                            object.stringValue = "";
                        else {
                            object.stringValue = [];
                            if (options.bytes !== Array)
                                object.stringValue = $util.newBuffer(object.stringValue);
                        }
                        object.aggregateValue = "";
                    }
                    if (message.name && message.name.length) {
                        object.name = [];
                        for (var j = 0; j < message.name.length; ++j)
                            object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options);
                    }
                    if (message.identifierValue != null && message.hasOwnProperty("identifierValue"))
                        object.identifierValue = message.identifierValue;
                    if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue"))
                        if (typeof message.positiveIntValue === "number")
                            object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue;
                        else
                            object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue;
                    if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue"))
                        if (typeof message.negativeIntValue === "number")
                            object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue;
                        else
                            object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue;
                    if (message.doubleValue != null && message.hasOwnProperty("doubleValue"))
                        object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue;
                    if (message.stringValue != null && message.hasOwnProperty("stringValue"))
                        object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue;
                    if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue"))
                        object.aggregateValue = message.aggregateValue;
                    return object;
                };
    
                /**
                 * Converts this UninterpretedOption to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.UninterpretedOption
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                UninterpretedOption.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for UninterpretedOption
                 * @function getTypeUrl
                 * @memberof google.protobuf.UninterpretedOption
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.UninterpretedOption";
                };
    
                UninterpretedOption.NamePart = (function() {
    
                    /**
                     * Properties of a NamePart.
                     * @memberof google.protobuf.UninterpretedOption
                     * @interface INamePart
                     * @property {string} namePart NamePart namePart
                     * @property {boolean} isExtension NamePart isExtension
                     */
    
                    /**
                     * Constructs a new NamePart.
                     * @memberof google.protobuf.UninterpretedOption
                     * @classdesc Represents a NamePart.
                     * @implements INamePart
                     * @constructor
                     * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
                     */
                    function NamePart(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * NamePart namePart.
                     * @member {string} namePart
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @instance
                     */
                    NamePart.prototype.namePart = "";
    
                    /**
                     * NamePart isExtension.
                     * @member {boolean} isExtension
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @instance
                     */
                    NamePart.prototype.isExtension = false;
    
                    /**
                     * Creates a new NamePart instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set
                     * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance
                     */
                    NamePart.create = function create(properties) {
                        return new NamePart(properties);
                    };
    
                    /**
                     * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NamePart.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart);
                        writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    NamePart.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a NamePart message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NamePart.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    message.namePart = reader.string();
                                    break;
                                }
                            case 2: {
                                    message.isExtension = reader.bool();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        if (!message.hasOwnProperty("namePart"))
                            throw $util.ProtocolError("missing required 'namePart'", { instance: message });
                        if (!message.hasOwnProperty("isExtension"))
                            throw $util.ProtocolError("missing required 'isExtension'", { instance: message });
                        return message;
                    };
    
                    /**
                     * Decodes a NamePart message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    NamePart.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a NamePart message.
                     * @function verify
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    NamePart.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (!$util.isString(message.namePart))
                            return "namePart: string expected";
                        if (typeof message.isExtension !== "boolean")
                            return "isExtension: boolean expected";
                        return null;
                    };
    
                    /**
                     * Creates a NamePart message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart
                     */
                    NamePart.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart)
                            return object;
                        var message = new $root.google.protobuf.UninterpretedOption.NamePart();
                        if (object.namePart != null)
                            message.namePart = String(object.namePart);
                        if (object.isExtension != null)
                            message.isExtension = Boolean(object.isExtension);
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a NamePart message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    NamePart.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.namePart = "";
                            object.isExtension = false;
                        }
                        if (message.namePart != null && message.hasOwnProperty("namePart"))
                            object.namePart = message.namePart;
                        if (message.isExtension != null && message.hasOwnProperty("isExtension"))
                            object.isExtension = message.isExtension;
                        return object;
                    };
    
                    /**
                     * Converts this NamePart to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    NamePart.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for NamePart
                     * @function getTypeUrl
                     * @memberof google.protobuf.UninterpretedOption.NamePart
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart";
                    };
    
                    return NamePart;
                })();
    
                return UninterpretedOption;
            })();
    
            protobuf.FeatureSet = (function() {
    
                /**
                 * Properties of a FeatureSet.
                 * @memberof google.protobuf
                 * @interface IFeatureSet
                 * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence
                 * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType
                 * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding
                 * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation
                 * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding
                 * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat
                 */
    
                /**
                 * Constructs a new FeatureSet.
                 * @memberof google.protobuf
                 * @classdesc Represents a FeatureSet.
                 * @implements IFeatureSet
                 * @constructor
                 * @param {google.protobuf.IFeatureSet=} [properties] Properties to set
                 */
                function FeatureSet(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FeatureSet fieldPresence.
                 * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.fieldPresence = 0;
    
                /**
                 * FeatureSet enumType.
                 * @member {google.protobuf.FeatureSet.EnumType} enumType
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.enumType = 0;
    
                /**
                 * FeatureSet repeatedFieldEncoding.
                 * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.repeatedFieldEncoding = 0;
    
                /**
                 * FeatureSet utf8Validation.
                 * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.utf8Validation = 0;
    
                /**
                 * FeatureSet messageEncoding.
                 * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.messageEncoding = 0;
    
                /**
                 * FeatureSet jsonFormat.
                 * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 */
                FeatureSet.prototype.jsonFormat = 0;
    
                /**
                 * Creates a new FeatureSet instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {google.protobuf.IFeatureSet=} [properties] Properties to set
                 * @returns {google.protobuf.FeatureSet} FeatureSet instance
                 */
                FeatureSet.create = function create(properties) {
                    return new FeatureSet(properties);
                };
    
                /**
                 * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FeatureSet.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence);
                    if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType);
                    if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding"))
                        writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding);
                    if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation"))
                        writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation);
                    if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding"))
                        writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding);
                    if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat"))
                        writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat);
                    return writer;
                };
    
                /**
                 * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FeatureSet.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FeatureSet message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FeatureSet} FeatureSet
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FeatureSet.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.fieldPresence = reader.int32();
                                break;
                            }
                        case 2: {
                                message.enumType = reader.int32();
                                break;
                            }
                        case 3: {
                                message.repeatedFieldEncoding = reader.int32();
                                break;
                            }
                        case 4: {
                                message.utf8Validation = reader.int32();
                                break;
                            }
                        case 5: {
                                message.messageEncoding = reader.int32();
                                break;
                            }
                        case 6: {
                                message.jsonFormat = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FeatureSet message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FeatureSet} FeatureSet
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FeatureSet.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FeatureSet message.
                 * @function verify
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FeatureSet.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence"))
                        switch (message.fieldPresence) {
                        default:
                            return "fieldPresence: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                        case 3:
                            break;
                        }
                    if (message.enumType != null && message.hasOwnProperty("enumType"))
                        switch (message.enumType) {
                        default:
                            return "enumType: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding"))
                        switch (message.repeatedFieldEncoding) {
                        default:
                            return "repeatedFieldEncoding: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation"))
                        switch (message.utf8Validation) {
                        default:
                            return "utf8Validation: enum value expected";
                        case 0:
                        case 2:
                        case 3:
                            break;
                        }
                    if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding"))
                        switch (message.messageEncoding) {
                        default:
                            return "messageEncoding: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat"))
                        switch (message.jsonFormat) {
                        default:
                            return "jsonFormat: enum value expected";
                        case 0:
                        case 1:
                        case 2:
                            break;
                        }
                    return null;
                };
    
                /**
                 * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FeatureSet} FeatureSet
                 */
                FeatureSet.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FeatureSet)
                        return object;
                    var message = new $root.google.protobuf.FeatureSet();
                    switch (object.fieldPresence) {
                    default:
                        if (typeof object.fieldPresence === "number") {
                            message.fieldPresence = object.fieldPresence;
                            break;
                        }
                        break;
                    case "FIELD_PRESENCE_UNKNOWN":
                    case 0:
                        message.fieldPresence = 0;
                        break;
                    case "EXPLICIT":
                    case 1:
                        message.fieldPresence = 1;
                        break;
                    case "IMPLICIT":
                    case 2:
                        message.fieldPresence = 2;
                        break;
                    case "LEGACY_REQUIRED":
                    case 3:
                        message.fieldPresence = 3;
                        break;
                    }
                    switch (object.enumType) {
                    default:
                        if (typeof object.enumType === "number") {
                            message.enumType = object.enumType;
                            break;
                        }
                        break;
                    case "ENUM_TYPE_UNKNOWN":
                    case 0:
                        message.enumType = 0;
                        break;
                    case "OPEN":
                    case 1:
                        message.enumType = 1;
                        break;
                    case "CLOSED":
                    case 2:
                        message.enumType = 2;
                        break;
                    }
                    switch (object.repeatedFieldEncoding) {
                    default:
                        if (typeof object.repeatedFieldEncoding === "number") {
                            message.repeatedFieldEncoding = object.repeatedFieldEncoding;
                            break;
                        }
                        break;
                    case "REPEATED_FIELD_ENCODING_UNKNOWN":
                    case 0:
                        message.repeatedFieldEncoding = 0;
                        break;
                    case "PACKED":
                    case 1:
                        message.repeatedFieldEncoding = 1;
                        break;
                    case "EXPANDED":
                    case 2:
                        message.repeatedFieldEncoding = 2;
                        break;
                    }
                    switch (object.utf8Validation) {
                    default:
                        if (typeof object.utf8Validation === "number") {
                            message.utf8Validation = object.utf8Validation;
                            break;
                        }
                        break;
                    case "UTF8_VALIDATION_UNKNOWN":
                    case 0:
                        message.utf8Validation = 0;
                        break;
                    case "VERIFY":
                    case 2:
                        message.utf8Validation = 2;
                        break;
                    case "NONE":
                    case 3:
                        message.utf8Validation = 3;
                        break;
                    }
                    switch (object.messageEncoding) {
                    default:
                        if (typeof object.messageEncoding === "number") {
                            message.messageEncoding = object.messageEncoding;
                            break;
                        }
                        break;
                    case "MESSAGE_ENCODING_UNKNOWN":
                    case 0:
                        message.messageEncoding = 0;
                        break;
                    case "LENGTH_PREFIXED":
                    case 1:
                        message.messageEncoding = 1;
                        break;
                    case "DELIMITED":
                    case 2:
                        message.messageEncoding = 2;
                        break;
                    }
                    switch (object.jsonFormat) {
                    default:
                        if (typeof object.jsonFormat === "number") {
                            message.jsonFormat = object.jsonFormat;
                            break;
                        }
                        break;
                    case "JSON_FORMAT_UNKNOWN":
                    case 0:
                        message.jsonFormat = 0;
                        break;
                    case "ALLOW":
                    case 1:
                        message.jsonFormat = 1;
                        break;
                    case "LEGACY_BEST_EFFORT":
                    case 2:
                        message.jsonFormat = 2;
                        break;
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FeatureSet message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {google.protobuf.FeatureSet} message FeatureSet
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FeatureSet.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0;
                        object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0;
                        object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0;
                        object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0;
                        object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0;
                        object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0;
                    }
                    if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence"))
                        object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence;
                    if (message.enumType != null && message.hasOwnProperty("enumType"))
                        object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType;
                    if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding"))
                        object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding;
                    if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation"))
                        object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation;
                    if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding"))
                        object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding;
                    if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat"))
                        object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat;
                    return object;
                };
    
                /**
                 * Converts this FeatureSet to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FeatureSet
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FeatureSet.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FeatureSet
                 * @function getTypeUrl
                 * @memberof google.protobuf.FeatureSet
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FeatureSet";
                };
    
                /**
                 * FieldPresence enum.
                 * @name google.protobuf.FeatureSet.FieldPresence
                 * @enum {number}
                 * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value
                 * @property {number} EXPLICIT=1 EXPLICIT value
                 * @property {number} IMPLICIT=2 IMPLICIT value
                 * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value
                 */
                FeatureSet.FieldPresence = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0;
                    values[valuesById[1] = "EXPLICIT"] = 1;
                    values[valuesById[2] = "IMPLICIT"] = 2;
                    values[valuesById[3] = "LEGACY_REQUIRED"] = 3;
                    return values;
                })();
    
                /**
                 * EnumType enum.
                 * @name google.protobuf.FeatureSet.EnumType
                 * @enum {number}
                 * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value
                 * @property {number} OPEN=1 OPEN value
                 * @property {number} CLOSED=2 CLOSED value
                 */
                FeatureSet.EnumType = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0;
                    values[valuesById[1] = "OPEN"] = 1;
                    values[valuesById[2] = "CLOSED"] = 2;
                    return values;
                })();
    
                /**
                 * RepeatedFieldEncoding enum.
                 * @name google.protobuf.FeatureSet.RepeatedFieldEncoding
                 * @enum {number}
                 * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value
                 * @property {number} PACKED=1 PACKED value
                 * @property {number} EXPANDED=2 EXPANDED value
                 */
                FeatureSet.RepeatedFieldEncoding = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0;
                    values[valuesById[1] = "PACKED"] = 1;
                    values[valuesById[2] = "EXPANDED"] = 2;
                    return values;
                })();
    
                /**
                 * Utf8Validation enum.
                 * @name google.protobuf.FeatureSet.Utf8Validation
                 * @enum {number}
                 * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value
                 * @property {number} VERIFY=2 VERIFY value
                 * @property {number} NONE=3 NONE value
                 */
                FeatureSet.Utf8Validation = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0;
                    values[valuesById[2] = "VERIFY"] = 2;
                    values[valuesById[3] = "NONE"] = 3;
                    return values;
                })();
    
                /**
                 * MessageEncoding enum.
                 * @name google.protobuf.FeatureSet.MessageEncoding
                 * @enum {number}
                 * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value
                 * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value
                 * @property {number} DELIMITED=2 DELIMITED value
                 */
                FeatureSet.MessageEncoding = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0;
                    values[valuesById[1] = "LENGTH_PREFIXED"] = 1;
                    values[valuesById[2] = "DELIMITED"] = 2;
                    return values;
                })();
    
                /**
                 * JsonFormat enum.
                 * @name google.protobuf.FeatureSet.JsonFormat
                 * @enum {number}
                 * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value
                 * @property {number} ALLOW=1 ALLOW value
                 * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value
                 */
                FeatureSet.JsonFormat = (function() {
                    var valuesById = {}, values = Object.create(valuesById);
                    values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0;
                    values[valuesById[1] = "ALLOW"] = 1;
                    values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2;
                    return values;
                })();
    
                return FeatureSet;
            })();
    
            protobuf.FeatureSetDefaults = (function() {
    
                /**
                 * Properties of a FeatureSetDefaults.
                 * @memberof google.protobuf
                 * @interface IFeatureSetDefaults
                 * @property {Array.<google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault>|null} [defaults] FeatureSetDefaults defaults
                 * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition
                 * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition
                 */
    
                /**
                 * Constructs a new FeatureSetDefaults.
                 * @memberof google.protobuf
                 * @classdesc Represents a FeatureSetDefaults.
                 * @implements IFeatureSetDefaults
                 * @constructor
                 * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set
                 */
                function FeatureSetDefaults(properties) {
                    this.defaults = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FeatureSetDefaults defaults.
                 * @member {Array.<google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault>} defaults
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @instance
                 */
                FeatureSetDefaults.prototype.defaults = $util.emptyArray;
    
                /**
                 * FeatureSetDefaults minimumEdition.
                 * @member {google.protobuf.Edition} minimumEdition
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @instance
                 */
                FeatureSetDefaults.prototype.minimumEdition = 0;
    
                /**
                 * FeatureSetDefaults maximumEdition.
                 * @member {google.protobuf.Edition} maximumEdition
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @instance
                 */
                FeatureSetDefaults.prototype.maximumEdition = 0;
    
                /**
                 * Creates a new FeatureSetDefaults instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set
                 * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance
                 */
                FeatureSetDefaults.create = function create(properties) {
                    return new FeatureSetDefaults(properties);
                };
    
                /**
                 * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FeatureSetDefaults.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.defaults != null && message.defaults.length)
                        for (var i = 0; i < message.defaults.length; ++i)
                            $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition"))
                        writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition);
                    if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition"))
                        writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition);
                    return writer;
                };
    
                /**
                 * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FeatureSetDefaults message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FeatureSetDefaults.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.defaults && message.defaults.length))
                                    message.defaults = [];
                                message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32()));
                                break;
                            }
                        case 4: {
                                message.minimumEdition = reader.int32();
                                break;
                            }
                        case 5: {
                                message.maximumEdition = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FeatureSetDefaults message.
                 * @function verify
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FeatureSetDefaults.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.defaults != null && message.hasOwnProperty("defaults")) {
                        if (!Array.isArray(message.defaults))
                            return "defaults: array expected";
                        for (var i = 0; i < message.defaults.length; ++i) {
                            var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]);
                            if (error)
                                return "defaults." + error;
                        }
                    }
                    if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition"))
                        switch (message.minimumEdition) {
                        default:
                            return "minimumEdition: enum value expected";
                        case 0:
                        case 998:
                        case 999:
                        case 1000:
                        case 1001:
                        case 1:
                        case 2:
                        case 99997:
                        case 99998:
                        case 99999:
                        case 2147483647:
                            break;
                        }
                    if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition"))
                        switch (message.maximumEdition) {
                        default:
                            return "maximumEdition: enum value expected";
                        case 0:
                        case 998:
                        case 999:
                        case 1000:
                        case 1001:
                        case 1:
                        case 2:
                        case 99997:
                        case 99998:
                        case 99999:
                        case 2147483647:
                            break;
                        }
                    return null;
                };
    
                /**
                 * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults
                 */
                FeatureSetDefaults.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FeatureSetDefaults)
                        return object;
                    var message = new $root.google.protobuf.FeatureSetDefaults();
                    if (object.defaults) {
                        if (!Array.isArray(object.defaults))
                            throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected");
                        message.defaults = [];
                        for (var i = 0; i < object.defaults.length; ++i) {
                            if (typeof object.defaults[i] !== "object")
                                throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected");
                            message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]);
                        }
                    }
                    switch (object.minimumEdition) {
                    default:
                        if (typeof object.minimumEdition === "number") {
                            message.minimumEdition = object.minimumEdition;
                            break;
                        }
                        break;
                    case "EDITION_UNKNOWN":
                    case 0:
                        message.minimumEdition = 0;
                        break;
                    case "EDITION_PROTO2":
                    case 998:
                        message.minimumEdition = 998;
                        break;
                    case "EDITION_PROTO3":
                    case 999:
                        message.minimumEdition = 999;
                        break;
                    case "EDITION_2023":
                    case 1000:
                        message.minimumEdition = 1000;
                        break;
                    case "EDITION_2024":
                    case 1001:
                        message.minimumEdition = 1001;
                        break;
                    case "EDITION_1_TEST_ONLY":
                    case 1:
                        message.minimumEdition = 1;
                        break;
                    case "EDITION_2_TEST_ONLY":
                    case 2:
                        message.minimumEdition = 2;
                        break;
                    case "EDITION_99997_TEST_ONLY":
                    case 99997:
                        message.minimumEdition = 99997;
                        break;
                    case "EDITION_99998_TEST_ONLY":
                    case 99998:
                        message.minimumEdition = 99998;
                        break;
                    case "EDITION_99999_TEST_ONLY":
                    case 99999:
                        message.minimumEdition = 99999;
                        break;
                    case "EDITION_MAX":
                    case 2147483647:
                        message.minimumEdition = 2147483647;
                        break;
                    }
                    switch (object.maximumEdition) {
                    default:
                        if (typeof object.maximumEdition === "number") {
                            message.maximumEdition = object.maximumEdition;
                            break;
                        }
                        break;
                    case "EDITION_UNKNOWN":
                    case 0:
                        message.maximumEdition = 0;
                        break;
                    case "EDITION_PROTO2":
                    case 998:
                        message.maximumEdition = 998;
                        break;
                    case "EDITION_PROTO3":
                    case 999:
                        message.maximumEdition = 999;
                        break;
                    case "EDITION_2023":
                    case 1000:
                        message.maximumEdition = 1000;
                        break;
                    case "EDITION_2024":
                    case 1001:
                        message.maximumEdition = 1001;
                        break;
                    case "EDITION_1_TEST_ONLY":
                    case 1:
                        message.maximumEdition = 1;
                        break;
                    case "EDITION_2_TEST_ONLY":
                    case 2:
                        message.maximumEdition = 2;
                        break;
                    case "EDITION_99997_TEST_ONLY":
                    case 99997:
                        message.maximumEdition = 99997;
                        break;
                    case "EDITION_99998_TEST_ONLY":
                    case 99998:
                        message.maximumEdition = 99998;
                        break;
                    case "EDITION_99999_TEST_ONLY":
                    case 99999:
                        message.maximumEdition = 99999;
                        break;
                    case "EDITION_MAX":
                    case 2147483647:
                        message.maximumEdition = 2147483647;
                        break;
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FeatureSetDefaults.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.defaults = [];
                    if (options.defaults) {
                        object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0;
                        object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0;
                    }
                    if (message.defaults && message.defaults.length) {
                        object.defaults = [];
                        for (var j = 0; j < message.defaults.length; ++j)
                            object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options);
                    }
                    if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition"))
                        object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition;
                    if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition"))
                        object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition;
                    return object;
                };
    
                /**
                 * Converts this FeatureSetDefaults to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FeatureSetDefaults.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FeatureSetDefaults
                 * @function getTypeUrl
                 * @memberof google.protobuf.FeatureSetDefaults
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults";
                };
    
                FeatureSetDefaults.FeatureSetEditionDefault = (function() {
    
                    /**
                     * Properties of a FeatureSetEditionDefault.
                     * @memberof google.protobuf.FeatureSetDefaults
                     * @interface IFeatureSetEditionDefault
                     * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition
                     * @property {google.protobuf.IFeatureSet|null} [features] FeatureSetEditionDefault features
                     */
    
                    /**
                     * Constructs a new FeatureSetEditionDefault.
                     * @memberof google.protobuf.FeatureSetDefaults
                     * @classdesc Represents a FeatureSetEditionDefault.
                     * @implements IFeatureSetEditionDefault
                     * @constructor
                     * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set
                     */
                    function FeatureSetEditionDefault(properties) {
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * FeatureSetEditionDefault edition.
                     * @member {google.protobuf.Edition} edition
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @instance
                     */
                    FeatureSetEditionDefault.prototype.edition = 0;
    
                    /**
                     * FeatureSetEditionDefault features.
                     * @member {google.protobuf.IFeatureSet|null|undefined} features
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @instance
                     */
                    FeatureSetEditionDefault.prototype.features = null;
    
                    /**
                     * Creates a new FeatureSetEditionDefault instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set
                     * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance
                     */
                    FeatureSetEditionDefault.create = function create(properties) {
                        return new FeatureSetEditionDefault(properties);
                    };
    
                    /**
                     * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    FeatureSetEditionDefault.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.features != null && Object.hasOwnProperty.call(message, "features"))
                            $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                        if (message.edition != null && Object.hasOwnProperty.call(message, "edition"))
                            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a FeatureSetEditionDefault message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    FeatureSetEditionDefault.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 3: {
                                    message.edition = reader.int32();
                                    break;
                                }
                            case 2: {
                                    message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a FeatureSetEditionDefault message.
                     * @function verify
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    FeatureSetEditionDefault.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.edition != null && message.hasOwnProperty("edition"))
                            switch (message.edition) {
                            default:
                                return "edition: enum value expected";
                            case 0:
                            case 998:
                            case 999:
                            case 1000:
                            case 1001:
                            case 1:
                            case 2:
                            case 99997:
                            case 99998:
                            case 99999:
                            case 2147483647:
                                break;
                            }
                        if (message.features != null && message.hasOwnProperty("features")) {
                            var error = $root.google.protobuf.FeatureSet.verify(message.features);
                            if (error)
                                return "features." + error;
                        }
                        return null;
                    };
    
                    /**
                     * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault
                     */
                    FeatureSetEditionDefault.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)
                            return object;
                        var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault();
                        switch (object.edition) {
                        default:
                            if (typeof object.edition === "number") {
                                message.edition = object.edition;
                                break;
                            }
                            break;
                        case "EDITION_UNKNOWN":
                        case 0:
                            message.edition = 0;
                            break;
                        case "EDITION_PROTO2":
                        case 998:
                            message.edition = 998;
                            break;
                        case "EDITION_PROTO3":
                        case 999:
                            message.edition = 999;
                            break;
                        case "EDITION_2023":
                        case 1000:
                            message.edition = 1000;
                            break;
                        case "EDITION_2024":
                        case 1001:
                            message.edition = 1001;
                            break;
                        case "EDITION_1_TEST_ONLY":
                        case 1:
                            message.edition = 1;
                            break;
                        case "EDITION_2_TEST_ONLY":
                        case 2:
                            message.edition = 2;
                            break;
                        case "EDITION_99997_TEST_ONLY":
                        case 99997:
                            message.edition = 99997;
                            break;
                        case "EDITION_99998_TEST_ONLY":
                        case 99998:
                            message.edition = 99998;
                            break;
                        case "EDITION_99999_TEST_ONLY":
                        case 99999:
                            message.edition = 99999;
                            break;
                        case "EDITION_MAX":
                        case 2147483647:
                            message.edition = 2147483647;
                            break;
                        }
                        if (object.features != null) {
                            if (typeof object.features !== "object")
                                throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.features: object expected");
                            message.features = $root.google.protobuf.FeatureSet.fromObject(object.features);
                        }
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    FeatureSetEditionDefault.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.defaults) {
                            object.features = null;
                            object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0;
                        }
                        if (message.features != null && message.hasOwnProperty("features"))
                            object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options);
                        if (message.edition != null && message.hasOwnProperty("edition"))
                            object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition;
                        return object;
                    };
    
                    /**
                     * Converts this FeatureSetEditionDefault to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    FeatureSetEditionDefault.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for FeatureSetEditionDefault
                     * @function getTypeUrl
                     * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault";
                    };
    
                    return FeatureSetEditionDefault;
                })();
    
                return FeatureSetDefaults;
            })();
    
            protobuf.SourceCodeInfo = (function() {
    
                /**
                 * Properties of a SourceCodeInfo.
                 * @memberof google.protobuf
                 * @interface ISourceCodeInfo
                 * @property {Array.<google.protobuf.SourceCodeInfo.ILocation>|null} [location] SourceCodeInfo location
                 */
    
                /**
                 * Constructs a new SourceCodeInfo.
                 * @memberof google.protobuf
                 * @classdesc Represents a SourceCodeInfo.
                 * @implements ISourceCodeInfo
                 * @constructor
                 * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
                 */
                function SourceCodeInfo(properties) {
                    this.location = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * SourceCodeInfo location.
                 * @member {Array.<google.protobuf.SourceCodeInfo.ILocation>} location
                 * @memberof google.protobuf.SourceCodeInfo
                 * @instance
                 */
                SourceCodeInfo.prototype.location = $util.emptyArray;
    
                /**
                 * Creates a new SourceCodeInfo instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set
                 * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance
                 */
                SourceCodeInfo.create = function create(properties) {
                    return new SourceCodeInfo(properties);
                };
    
                /**
                 * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SourceCodeInfo.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.location != null && message.location.length)
                        for (var i = 0; i < message.location.length; ++i)
                            $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a SourceCodeInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SourceCodeInfo.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.location && message.location.length))
                                    message.location = [];
                                message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a SourceCodeInfo message.
                 * @function verify
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                SourceCodeInfo.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.location != null && message.hasOwnProperty("location")) {
                        if (!Array.isArray(message.location))
                            return "location: array expected";
                        for (var i = 0; i < message.location.length; ++i) {
                            var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]);
                            if (error)
                                return "location." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo
                 */
                SourceCodeInfo.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.SourceCodeInfo)
                        return object;
                    var message = new $root.google.protobuf.SourceCodeInfo();
                    if (object.location) {
                        if (!Array.isArray(object.location))
                            throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");
                        message.location = [];
                        for (var i = 0; i < object.location.length; ++i) {
                            if (typeof object.location[i] !== "object")
                                throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");
                            message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                SourceCodeInfo.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.location = [];
                    if (message.location && message.location.length) {
                        object.location = [];
                        for (var j = 0; j < message.location.length; ++j)
                            object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this SourceCodeInfo to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.SourceCodeInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                SourceCodeInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for SourceCodeInfo
                 * @function getTypeUrl
                 * @memberof google.protobuf.SourceCodeInfo
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.SourceCodeInfo";
                };
    
                SourceCodeInfo.Location = (function() {
    
                    /**
                     * Properties of a Location.
                     * @memberof google.protobuf.SourceCodeInfo
                     * @interface ILocation
                     * @property {Array.<number>|null} [path] Location path
                     * @property {Array.<number>|null} [span] Location span
                     * @property {string|null} [leadingComments] Location leadingComments
                     * @property {string|null} [trailingComments] Location trailingComments
                     * @property {Array.<string>|null} [leadingDetachedComments] Location leadingDetachedComments
                     */
    
                    /**
                     * Constructs a new Location.
                     * @memberof google.protobuf.SourceCodeInfo
                     * @classdesc Represents a Location.
                     * @implements ILocation
                     * @constructor
                     * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
                     */
                    function Location(properties) {
                        this.path = [];
                        this.span = [];
                        this.leadingDetachedComments = [];
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * Location path.
                     * @member {Array.<number>} path
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     */
                    Location.prototype.path = $util.emptyArray;
    
                    /**
                     * Location span.
                     * @member {Array.<number>} span
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     */
                    Location.prototype.span = $util.emptyArray;
    
                    /**
                     * Location leadingComments.
                     * @member {string} leadingComments
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     */
                    Location.prototype.leadingComments = "";
    
                    /**
                     * Location trailingComments.
                     * @member {string} trailingComments
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     */
                    Location.prototype.trailingComments = "";
    
                    /**
                     * Location leadingDetachedComments.
                     * @member {Array.<string>} leadingDetachedComments
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     */
                    Location.prototype.leadingDetachedComments = $util.emptyArray;
    
                    /**
                     * Creates a new Location instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set
                     * @returns {google.protobuf.SourceCodeInfo.Location} Location instance
                     */
                    Location.create = function create(properties) {
                        return new Location(properties);
                    };
    
                    /**
                     * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Location.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.path != null && message.path.length) {
                            writer.uint32(/* id 1, wireType 2 =*/10).fork();
                            for (var i = 0; i < message.path.length; ++i)
                                writer.int32(message.path[i]);
                            writer.ldelim();
                        }
                        if (message.span != null && message.span.length) {
                            writer.uint32(/* id 2, wireType 2 =*/18).fork();
                            for (var i = 0; i < message.span.length; ++i)
                                writer.int32(message.span[i]);
                            writer.ldelim();
                        }
                        if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments"))
                            writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments);
                        if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments"))
                            writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments);
                        if (message.leadingDetachedComments != null && message.leadingDetachedComments.length)
                            for (var i = 0; i < message.leadingDetachedComments.length; ++i)
                                writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Location.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes a Location message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.SourceCodeInfo.Location} Location
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Location.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    if (!(message.path && message.path.length))
                                        message.path = [];
                                    if ((tag & 7) === 2) {
                                        var end2 = reader.uint32() + reader.pos;
                                        while (reader.pos < end2)
                                            message.path.push(reader.int32());
                                    } else
                                        message.path.push(reader.int32());
                                    break;
                                }
                            case 2: {
                                    if (!(message.span && message.span.length))
                                        message.span = [];
                                    if ((tag & 7) === 2) {
                                        var end2 = reader.uint32() + reader.pos;
                                        while (reader.pos < end2)
                                            message.span.push(reader.int32());
                                    } else
                                        message.span.push(reader.int32());
                                    break;
                                }
                            case 3: {
                                    message.leadingComments = reader.string();
                                    break;
                                }
                            case 4: {
                                    message.trailingComments = reader.string();
                                    break;
                                }
                            case 6: {
                                    if (!(message.leadingDetachedComments && message.leadingDetachedComments.length))
                                        message.leadingDetachedComments = [];
                                    message.leadingDetachedComments.push(reader.string());
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes a Location message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.SourceCodeInfo.Location} Location
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Location.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies a Location message.
                     * @function verify
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Location.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.path != null && message.hasOwnProperty("path")) {
                            if (!Array.isArray(message.path))
                                return "path: array expected";
                            for (var i = 0; i < message.path.length; ++i)
                                if (!$util.isInteger(message.path[i]))
                                    return "path: integer[] expected";
                        }
                        if (message.span != null && message.hasOwnProperty("span")) {
                            if (!Array.isArray(message.span))
                                return "span: array expected";
                            for (var i = 0; i < message.span.length; ++i)
                                if (!$util.isInteger(message.span[i]))
                                    return "span: integer[] expected";
                        }
                        if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
                            if (!$util.isString(message.leadingComments))
                                return "leadingComments: string expected";
                        if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
                            if (!$util.isString(message.trailingComments))
                                return "trailingComments: string expected";
                        if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) {
                            if (!Array.isArray(message.leadingDetachedComments))
                                return "leadingDetachedComments: array expected";
                            for (var i = 0; i < message.leadingDetachedComments.length; ++i)
                                if (!$util.isString(message.leadingDetachedComments[i]))
                                    return "leadingDetachedComments: string[] expected";
                        }
                        return null;
                    };
    
                    /**
                     * Creates a Location message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.SourceCodeInfo.Location} Location
                     */
                    Location.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.SourceCodeInfo.Location)
                            return object;
                        var message = new $root.google.protobuf.SourceCodeInfo.Location();
                        if (object.path) {
                            if (!Array.isArray(object.path))
                                throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");
                            message.path = [];
                            for (var i = 0; i < object.path.length; ++i)
                                message.path[i] = object.path[i] | 0;
                        }
                        if (object.span) {
                            if (!Array.isArray(object.span))
                                throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");
                            message.span = [];
                            for (var i = 0; i < object.span.length; ++i)
                                message.span[i] = object.span[i] | 0;
                        }
                        if (object.leadingComments != null)
                            message.leadingComments = String(object.leadingComments);
                        if (object.trailingComments != null)
                            message.trailingComments = String(object.trailingComments);
                        if (object.leadingDetachedComments) {
                            if (!Array.isArray(object.leadingDetachedComments))
                                throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");
                            message.leadingDetachedComments = [];
                            for (var i = 0; i < object.leadingDetachedComments.length; ++i)
                                message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]);
                        }
                        return message;
                    };
    
                    /**
                     * Creates a plain object from a Location message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {google.protobuf.SourceCodeInfo.Location} message Location
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Location.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.arrays || options.defaults) {
                            object.path = [];
                            object.span = [];
                            object.leadingDetachedComments = [];
                        }
                        if (options.defaults) {
                            object.leadingComments = "";
                            object.trailingComments = "";
                        }
                        if (message.path && message.path.length) {
                            object.path = [];
                            for (var j = 0; j < message.path.length; ++j)
                                object.path[j] = message.path[j];
                        }
                        if (message.span && message.span.length) {
                            object.span = [];
                            for (var j = 0; j < message.span.length; ++j)
                                object.span[j] = message.span[j];
                        }
                        if (message.leadingComments != null && message.hasOwnProperty("leadingComments"))
                            object.leadingComments = message.leadingComments;
                        if (message.trailingComments != null && message.hasOwnProperty("trailingComments"))
                            object.trailingComments = message.trailingComments;
                        if (message.leadingDetachedComments && message.leadingDetachedComments.length) {
                            object.leadingDetachedComments = [];
                            for (var j = 0; j < message.leadingDetachedComments.length; ++j)
                                object.leadingDetachedComments[j] = message.leadingDetachedComments[j];
                        }
                        return object;
                    };
    
                    /**
                     * Converts this Location to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Location.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for Location
                     * @function getTypeUrl
                     * @memberof google.protobuf.SourceCodeInfo.Location
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location";
                    };
    
                    return Location;
                })();
    
                return SourceCodeInfo;
            })();
    
            protobuf.GeneratedCodeInfo = (function() {
    
                /**
                 * Properties of a GeneratedCodeInfo.
                 * @memberof google.protobuf
                 * @interface IGeneratedCodeInfo
                 * @property {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>|null} [annotation] GeneratedCodeInfo annotation
                 */
    
                /**
                 * Constructs a new GeneratedCodeInfo.
                 * @memberof google.protobuf
                 * @classdesc Represents a GeneratedCodeInfo.
                 * @implements IGeneratedCodeInfo
                 * @constructor
                 * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
                 */
                function GeneratedCodeInfo(properties) {
                    this.annotation = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * GeneratedCodeInfo annotation.
                 * @member {Array.<google.protobuf.GeneratedCodeInfo.IAnnotation>} annotation
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @instance
                 */
                GeneratedCodeInfo.prototype.annotation = $util.emptyArray;
    
                /**
                 * Creates a new GeneratedCodeInfo instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set
                 * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance
                 */
                GeneratedCodeInfo.create = function create(properties) {
                    return new GeneratedCodeInfo(properties);
                };
    
                /**
                 * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GeneratedCodeInfo.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.annotation != null && message.annotation.length)
                        for (var i = 0; i < message.annotation.length; ++i)
                            $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a GeneratedCodeInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GeneratedCodeInfo.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.annotation && message.annotation.length))
                                    message.annotation = [];
                                message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a GeneratedCodeInfo message.
                 * @function verify
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GeneratedCodeInfo.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.annotation != null && message.hasOwnProperty("annotation")) {
                        if (!Array.isArray(message.annotation))
                            return "annotation: array expected";
                        for (var i = 0; i < message.annotation.length; ++i) {
                            var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]);
                            if (error)
                                return "annotation." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo
                 */
                GeneratedCodeInfo.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.GeneratedCodeInfo)
                        return object;
                    var message = new $root.google.protobuf.GeneratedCodeInfo();
                    if (object.annotation) {
                        if (!Array.isArray(object.annotation))
                            throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");
                        message.annotation = [];
                        for (var i = 0; i < object.annotation.length; ++i) {
                            if (typeof object.annotation[i] !== "object")
                                throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");
                            message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GeneratedCodeInfo.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.annotation = [];
                    if (message.annotation && message.annotation.length) {
                        object.annotation = [];
                        for (var j = 0; j < message.annotation.length; ++j)
                            object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this GeneratedCodeInfo to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GeneratedCodeInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for GeneratedCodeInfo
                 * @function getTypeUrl
                 * @memberof google.protobuf.GeneratedCodeInfo
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo";
                };
    
                GeneratedCodeInfo.Annotation = (function() {
    
                    /**
                     * Properties of an Annotation.
                     * @memberof google.protobuf.GeneratedCodeInfo
                     * @interface IAnnotation
                     * @property {Array.<number>|null} [path] Annotation path
                     * @property {string|null} [sourceFile] Annotation sourceFile
                     * @property {number|null} [begin] Annotation begin
                     * @property {number|null} [end] Annotation end
                     * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic
                     */
    
                    /**
                     * Constructs a new Annotation.
                     * @memberof google.protobuf.GeneratedCodeInfo
                     * @classdesc Represents an Annotation.
                     * @implements IAnnotation
                     * @constructor
                     * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
                     */
                    function Annotation(properties) {
                        this.path = [];
                        if (properties)
                            for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                                if (properties[keys[i]] != null)
                                    this[keys[i]] = properties[keys[i]];
                    }
    
                    /**
                     * Annotation path.
                     * @member {Array.<number>} path
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     */
                    Annotation.prototype.path = $util.emptyArray;
    
                    /**
                     * Annotation sourceFile.
                     * @member {string} sourceFile
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     */
                    Annotation.prototype.sourceFile = "";
    
                    /**
                     * Annotation begin.
                     * @member {number} begin
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     */
                    Annotation.prototype.begin = 0;
    
                    /**
                     * Annotation end.
                     * @member {number} end
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     */
                    Annotation.prototype.end = 0;
    
                    /**
                     * Annotation semantic.
                     * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     */
                    Annotation.prototype.semantic = 0;
    
                    /**
                     * Creates a new Annotation instance using the specified properties.
                     * @function create
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set
                     * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance
                     */
                    Annotation.create = function create(properties) {
                        return new Annotation(properties);
                    };
    
                    /**
                     * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
                     * @function encode
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Annotation.encode = function encode(message, writer) {
                        if (!writer)
                            writer = $Writer.create();
                        if (message.path != null && message.path.length) {
                            writer.uint32(/* id 1, wireType 2 =*/10).fork();
                            for (var i = 0; i < message.path.length; ++i)
                                writer.int32(message.path[i]);
                            writer.ldelim();
                        }
                        if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile"))
                            writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile);
                        if (message.begin != null && Object.hasOwnProperty.call(message, "begin"))
                            writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin);
                        if (message.end != null && Object.hasOwnProperty.call(message, "end"))
                            writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end);
                        if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic"))
                            writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic);
                        return writer;
                    };
    
                    /**
                     * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages.
                     * @function encodeDelimited
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode
                     * @param {$protobuf.Writer} [writer] Writer to encode to
                     * @returns {$protobuf.Writer} Writer
                     */
                    Annotation.encodeDelimited = function encodeDelimited(message, writer) {
                        return this.encode(message, writer).ldelim();
                    };
    
                    /**
                     * Decodes an Annotation message from the specified reader or buffer.
                     * @function decode
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @param {number} [length] Message length if known beforehand
                     * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Annotation.decode = function decode(reader, length) {
                        if (!(reader instanceof $Reader))
                            reader = $Reader.create(reader);
                        var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
                        while (reader.pos < end) {
                            var tag = reader.uint32();
                            switch (tag >>> 3) {
                            case 1: {
                                    if (!(message.path && message.path.length))
                                        message.path = [];
                                    if ((tag & 7) === 2) {
                                        var end2 = reader.uint32() + reader.pos;
                                        while (reader.pos < end2)
                                            message.path.push(reader.int32());
                                    } else
                                        message.path.push(reader.int32());
                                    break;
                                }
                            case 2: {
                                    message.sourceFile = reader.string();
                                    break;
                                }
                            case 3: {
                                    message.begin = reader.int32();
                                    break;
                                }
                            case 4: {
                                    message.end = reader.int32();
                                    break;
                                }
                            case 5: {
                                    message.semantic = reader.int32();
                                    break;
                                }
                            default:
                                reader.skipType(tag & 7);
                                break;
                            }
                        }
                        return message;
                    };
    
                    /**
                     * Decodes an Annotation message from the specified reader or buffer, length delimited.
                     * @function decodeDelimited
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                     * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
                     * @throws {Error} If the payload is not a reader or valid buffer
                     * @throws {$protobuf.util.ProtocolError} If required fields are missing
                     */
                    Annotation.decodeDelimited = function decodeDelimited(reader) {
                        if (!(reader instanceof $Reader))
                            reader = new $Reader(reader);
                        return this.decode(reader, reader.uint32());
                    };
    
                    /**
                     * Verifies an Annotation message.
                     * @function verify
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {Object.<string,*>} message Plain object to verify
                     * @returns {string|null} `null` if valid, otherwise the reason why it is not
                     */
                    Annotation.verify = function verify(message) {
                        if (typeof message !== "object" || message === null)
                            return "object expected";
                        if (message.path != null && message.hasOwnProperty("path")) {
                            if (!Array.isArray(message.path))
                                return "path: array expected";
                            for (var i = 0; i < message.path.length; ++i)
                                if (!$util.isInteger(message.path[i]))
                                    return "path: integer[] expected";
                        }
                        if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
                            if (!$util.isString(message.sourceFile))
                                return "sourceFile: string expected";
                        if (message.begin != null && message.hasOwnProperty("begin"))
                            if (!$util.isInteger(message.begin))
                                return "begin: integer expected";
                        if (message.end != null && message.hasOwnProperty("end"))
                            if (!$util.isInteger(message.end))
                                return "end: integer expected";
                        if (message.semantic != null && message.hasOwnProperty("semantic"))
                            switch (message.semantic) {
                            default:
                                return "semantic: enum value expected";
                            case 0:
                            case 1:
                            case 2:
                                break;
                            }
                        return null;
                    };
    
                    /**
                     * Creates an Annotation message from a plain object. Also converts values to their respective internal types.
                     * @function fromObject
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {Object.<string,*>} object Plain object
                     * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation
                     */
                    Annotation.fromObject = function fromObject(object) {
                        if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation)
                            return object;
                        var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation();
                        if (object.path) {
                            if (!Array.isArray(object.path))
                                throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");
                            message.path = [];
                            for (var i = 0; i < object.path.length; ++i)
                                message.path[i] = object.path[i] | 0;
                        }
                        if (object.sourceFile != null)
                            message.sourceFile = String(object.sourceFile);
                        if (object.begin != null)
                            message.begin = object.begin | 0;
                        if (object.end != null)
                            message.end = object.end | 0;
                        switch (object.semantic) {
                        default:
                            if (typeof object.semantic === "number") {
                                message.semantic = object.semantic;
                                break;
                            }
                            break;
                        case "NONE":
                        case 0:
                            message.semantic = 0;
                            break;
                        case "SET":
                        case 1:
                            message.semantic = 1;
                            break;
                        case "ALIAS":
                        case 2:
                            message.semantic = 2;
                            break;
                        }
                        return message;
                    };
    
                    /**
                     * Creates a plain object from an Annotation message. Also converts values to other types if specified.
                     * @function toObject
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation
                     * @param {$protobuf.IConversionOptions} [options] Conversion options
                     * @returns {Object.<string,*>} Plain object
                     */
                    Annotation.toObject = function toObject(message, options) {
                        if (!options)
                            options = {};
                        var object = {};
                        if (options.arrays || options.defaults)
                            object.path = [];
                        if (options.defaults) {
                            object.sourceFile = "";
                            object.begin = 0;
                            object.end = 0;
                            object.semantic = options.enums === String ? "NONE" : 0;
                        }
                        if (message.path && message.path.length) {
                            object.path = [];
                            for (var j = 0; j < message.path.length; ++j)
                                object.path[j] = message.path[j];
                        }
                        if (message.sourceFile != null && message.hasOwnProperty("sourceFile"))
                            object.sourceFile = message.sourceFile;
                        if (message.begin != null && message.hasOwnProperty("begin"))
                            object.begin = message.begin;
                        if (message.end != null && message.hasOwnProperty("end"))
                            object.end = message.end;
                        if (message.semantic != null && message.hasOwnProperty("semantic"))
                            object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic;
                        return object;
                    };
    
                    /**
                     * Converts this Annotation to JSON.
                     * @function toJSON
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @instance
                     * @returns {Object.<string,*>} JSON object
                     */
                    Annotation.prototype.toJSON = function toJSON() {
                        return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                    };
    
                    /**
                     * Gets the default type url for Annotation
                     * @function getTypeUrl
                     * @memberof google.protobuf.GeneratedCodeInfo.Annotation
                     * @static
                     * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                     * @returns {string} The default type url
                     */
                    Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                        if (typeUrlPrefix === undefined) {
                            typeUrlPrefix = "type.googleapis.com";
                        }
                        return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation";
                    };
    
                    /**
                     * Semantic enum.
                     * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic
                     * @enum {number}
                     * @property {number} NONE=0 NONE value
                     * @property {number} SET=1 SET value
                     * @property {number} ALIAS=2 ALIAS value
                     */
                    Annotation.Semantic = (function() {
                        var valuesById = {}, values = Object.create(valuesById);
                        values[valuesById[0] = "NONE"] = 0;
                        values[valuesById[1] = "SET"] = 1;
                        values[valuesById[2] = "ALIAS"] = 2;
                        return values;
                    })();
    
                    return Annotation;
                })();
    
                return GeneratedCodeInfo;
            })();
    
            protobuf.Duration = (function() {
    
                /**
                 * Properties of a Duration.
                 * @memberof google.protobuf
                 * @interface IDuration
                 * @property {number|Long|null} [seconds] Duration seconds
                 * @property {number|null} [nanos] Duration nanos
                 */
    
                /**
                 * Constructs a new Duration.
                 * @memberof google.protobuf
                 * @classdesc Represents a Duration.
                 * @implements IDuration
                 * @constructor
                 * @param {google.protobuf.IDuration=} [properties] Properties to set
                 */
                function Duration(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Duration seconds.
                 * @member {number|Long} seconds
                 * @memberof google.protobuf.Duration
                 * @instance
                 */
                Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
    
                /**
                 * Duration nanos.
                 * @member {number} nanos
                 * @memberof google.protobuf.Duration
                 * @instance
                 */
                Duration.prototype.nanos = 0;
    
                /**
                 * Creates a new Duration instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {google.protobuf.IDuration=} [properties] Properties to set
                 * @returns {google.protobuf.Duration} Duration instance
                 */
                Duration.create = function create(properties) {
                    return new Duration(properties);
                };
    
                /**
                 * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {google.protobuf.IDuration} message Duration message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Duration.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);
                    if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);
                    return writer;
                };
    
                /**
                 * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {google.protobuf.IDuration} message Duration message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Duration.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Duration message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Duration} Duration
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Duration.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.seconds = reader.int64();
                                break;
                            }
                        case 2: {
                                message.nanos = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Duration message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Duration} Duration
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Duration.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Duration message.
                 * @function verify
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Duration.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.seconds != null && message.hasOwnProperty("seconds"))
                        if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))
                            return "seconds: integer|Long expected";
                    if (message.nanos != null && message.hasOwnProperty("nanos"))
                        if (!$util.isInteger(message.nanos))
                            return "nanos: integer expected";
                    return null;
                };
    
                /**
                 * Creates a Duration message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Duration} Duration
                 */
                Duration.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Duration)
                        return object;
                    var message = new $root.google.protobuf.Duration();
                    if (object.seconds != null)
                        if ($util.Long)
                            (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;
                        else if (typeof object.seconds === "string")
                            message.seconds = parseInt(object.seconds, 10);
                        else if (typeof object.seconds === "number")
                            message.seconds = object.seconds;
                        else if (typeof object.seconds === "object")
                            message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();
                    if (object.nanos != null)
                        message.nanos = object.nanos | 0;
                    return message;
                };
    
                /**
                 * Creates a plain object from a Duration message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {google.protobuf.Duration} message Duration
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Duration.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.seconds = options.longs === String ? "0" : 0;
                        object.nanos = 0;
                    }
                    if (message.seconds != null && message.hasOwnProperty("seconds"))
                        if (typeof message.seconds === "number")
                            object.seconds = options.longs === String ? String(message.seconds) : message.seconds;
                        else
                            object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;
                    if (message.nanos != null && message.hasOwnProperty("nanos"))
                        object.nanos = message.nanos;
                    return object;
                };
    
                /**
                 * Converts this Duration to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Duration
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Duration.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Duration
                 * @function getTypeUrl
                 * @memberof google.protobuf.Duration
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Duration";
                };
    
                return Duration;
            })();
    
            protobuf.Any = (function() {
    
                /**
                 * Properties of an Any.
                 * @memberof google.protobuf
                 * @interface IAny
                 * @property {string|null} [type_url] Any type_url
                 * @property {Uint8Array|null} [value] Any value
                 */
    
                /**
                 * Constructs a new Any.
                 * @memberof google.protobuf
                 * @classdesc Represents an Any.
                 * @implements IAny
                 * @constructor
                 * @param {google.protobuf.IAny=} [properties] Properties to set
                 */
                function Any(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Any type_url.
                 * @member {string} type_url
                 * @memberof google.protobuf.Any
                 * @instance
                 */
                Any.prototype.type_url = "";
    
                /**
                 * Any value.
                 * @member {Uint8Array} value
                 * @memberof google.protobuf.Any
                 * @instance
                 */
                Any.prototype.value = $util.newBuffer([]);
    
                /**
                 * Creates a new Any instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {google.protobuf.IAny=} [properties] Properties to set
                 * @returns {google.protobuf.Any} Any instance
                 */
                Any.create = function create(properties) {
                    return new Any(properties);
                };
    
                /**
                 * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {google.protobuf.IAny} message Any message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Any.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url);
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {google.protobuf.IAny} message Any message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Any.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an Any message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Any} Any
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Any.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.type_url = reader.string();
                                break;
                            }
                        case 2: {
                                message.value = reader.bytes();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an Any message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Any} Any
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Any.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an Any message.
                 * @function verify
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Any.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.type_url != null && message.hasOwnProperty("type_url"))
                        if (!$util.isString(message.type_url))
                            return "type_url: string expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
                            return "value: buffer expected";
                    return null;
                };
    
                /**
                 * Creates an Any message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Any} Any
                 */
                Any.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Any)
                        return object;
                    var message = new $root.google.protobuf.Any();
                    if (object.type_url != null)
                        message.type_url = String(object.type_url);
                    if (object.value != null)
                        if (typeof object.value === "string")
                            $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
                        else if (object.value.length >= 0)
                            message.value = object.value;
                    return message;
                };
    
                /**
                 * Creates a plain object from an Any message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {google.protobuf.Any} message Any
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Any.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.type_url = "";
                        if (options.bytes === String)
                            object.value = "";
                        else {
                            object.value = [];
                            if (options.bytes !== Array)
                                object.value = $util.newBuffer(object.value);
                        }
                    }
                    if (message.type_url != null && message.hasOwnProperty("type_url"))
                        object.type_url = message.type_url;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
                    return object;
                };
    
                /**
                 * Converts this Any to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Any
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Any.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Any
                 * @function getTypeUrl
                 * @memberof google.protobuf.Any
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Any";
                };
    
                return Any;
            })();
    
            protobuf.Empty = (function() {
    
                /**
                 * Properties of an Empty.
                 * @memberof google.protobuf
                 * @interface IEmpty
                 */
    
                /**
                 * Constructs a new Empty.
                 * @memberof google.protobuf
                 * @classdesc Represents an Empty.
                 * @implements IEmpty
                 * @constructor
                 * @param {google.protobuf.IEmpty=} [properties] Properties to set
                 */
                function Empty(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Creates a new Empty instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {google.protobuf.IEmpty=} [properties] Properties to set
                 * @returns {google.protobuf.Empty} Empty instance
                 */
                Empty.create = function create(properties) {
                    return new Empty(properties);
                };
    
                /**
                 * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Empty.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    return writer;
                };
    
                /**
                 * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {google.protobuf.IEmpty} message Empty message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Empty.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an Empty message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Empty} Empty
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Empty.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an Empty message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Empty} Empty
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Empty.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an Empty message.
                 * @function verify
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Empty.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    return null;
                };
    
                /**
                 * Creates an Empty message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Empty} Empty
                 */
                Empty.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Empty)
                        return object;
                    return new $root.google.protobuf.Empty();
                };
    
                /**
                 * Creates a plain object from an Empty message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {google.protobuf.Empty} message Empty
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Empty.toObject = function toObject() {
                    return {};
                };
    
                /**
                 * Converts this Empty to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Empty
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Empty.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Empty
                 * @function getTypeUrl
                 * @memberof google.protobuf.Empty
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Empty";
                };
    
                return Empty;
            })();
    
            protobuf.FieldMask = (function() {
    
                /**
                 * Properties of a FieldMask.
                 * @memberof google.protobuf
                 * @interface IFieldMask
                 * @property {Array.<string>|null} [paths] FieldMask paths
                 */
    
                /**
                 * Constructs a new FieldMask.
                 * @memberof google.protobuf
                 * @classdesc Represents a FieldMask.
                 * @implements IFieldMask
                 * @constructor
                 * @param {google.protobuf.IFieldMask=} [properties] Properties to set
                 */
                function FieldMask(properties) {
                    this.paths = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FieldMask paths.
                 * @member {Array.<string>} paths
                 * @memberof google.protobuf.FieldMask
                 * @instance
                 */
                FieldMask.prototype.paths = $util.emptyArray;
    
                /**
                 * Creates a new FieldMask instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {google.protobuf.IFieldMask=} [properties] Properties to set
                 * @returns {google.protobuf.FieldMask} FieldMask instance
                 */
                FieldMask.create = function create(properties) {
                    return new FieldMask(properties);
                };
    
                /**
                 * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldMask.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.paths != null && message.paths.length)
                        for (var i = 0; i < message.paths.length; ++i)
                            writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]);
                    return writer;
                };
    
                /**
                 * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FieldMask.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FieldMask message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FieldMask} FieldMask
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldMask.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.paths && message.paths.length))
                                    message.paths = [];
                                message.paths.push(reader.string());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FieldMask message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FieldMask} FieldMask
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FieldMask.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FieldMask message.
                 * @function verify
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FieldMask.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.paths != null && message.hasOwnProperty("paths")) {
                        if (!Array.isArray(message.paths))
                            return "paths: array expected";
                        for (var i = 0; i < message.paths.length; ++i)
                            if (!$util.isString(message.paths[i]))
                                return "paths: string[] expected";
                    }
                    return null;
                };
    
                /**
                 * Creates a FieldMask message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FieldMask} FieldMask
                 */
                FieldMask.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FieldMask)
                        return object;
                    var message = new $root.google.protobuf.FieldMask();
                    if (object.paths) {
                        if (!Array.isArray(object.paths))
                            throw TypeError(".google.protobuf.FieldMask.paths: array expected");
                        message.paths = [];
                        for (var i = 0; i < object.paths.length; ++i)
                            message.paths[i] = String(object.paths[i]);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a FieldMask message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {google.protobuf.FieldMask} message FieldMask
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FieldMask.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.paths = [];
                    if (message.paths && message.paths.length) {
                        object.paths = [];
                        for (var j = 0; j < message.paths.length; ++j)
                            object.paths[j] = message.paths[j];
                    }
                    return object;
                };
    
                /**
                 * Converts this FieldMask to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FieldMask
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FieldMask.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FieldMask
                 * @function getTypeUrl
                 * @memberof google.protobuf.FieldMask
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FieldMask";
                };
    
                return FieldMask;
            })();
    
            protobuf.Timestamp = (function() {
    
                /**
                 * Properties of a Timestamp.
                 * @memberof google.protobuf
                 * @interface ITimestamp
                 * @property {number|Long|null} [seconds] Timestamp seconds
                 * @property {number|null} [nanos] Timestamp nanos
                 */
    
                /**
                 * Constructs a new Timestamp.
                 * @memberof google.protobuf
                 * @classdesc Represents a Timestamp.
                 * @implements ITimestamp
                 * @constructor
                 * @param {google.protobuf.ITimestamp=} [properties] Properties to set
                 */
                function Timestamp(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Timestamp seconds.
                 * @member {number|Long} seconds
                 * @memberof google.protobuf.Timestamp
                 * @instance
                 */
                Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
    
                /**
                 * Timestamp nanos.
                 * @member {number} nanos
                 * @memberof google.protobuf.Timestamp
                 * @instance
                 */
                Timestamp.prototype.nanos = 0;
    
                /**
                 * Creates a new Timestamp instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {google.protobuf.ITimestamp=} [properties] Properties to set
                 * @returns {google.protobuf.Timestamp} Timestamp instance
                 */
                Timestamp.create = function create(properties) {
                    return new Timestamp(properties);
                };
    
                /**
                 * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Timestamp.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds);
                    if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos);
                    return writer;
                };
    
                /**
                 * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Timestamp.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Timestamp message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Timestamp} Timestamp
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Timestamp.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.seconds = reader.int64();
                                break;
                            }
                        case 2: {
                                message.nanos = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Timestamp message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Timestamp} Timestamp
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Timestamp.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Timestamp message.
                 * @function verify
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Timestamp.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.seconds != null && message.hasOwnProperty("seconds"))
                        if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high)))
                            return "seconds: integer|Long expected";
                    if (message.nanos != null && message.hasOwnProperty("nanos"))
                        if (!$util.isInteger(message.nanos))
                            return "nanos: integer expected";
                    return null;
                };
    
                /**
                 * Creates a Timestamp message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Timestamp} Timestamp
                 */
                Timestamp.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Timestamp)
                        return object;
                    var message = new $root.google.protobuf.Timestamp();
                    if (object.seconds != null)
                        if ($util.Long)
                            (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false;
                        else if (typeof object.seconds === "string")
                            message.seconds = parseInt(object.seconds, 10);
                        else if (typeof object.seconds === "number")
                            message.seconds = object.seconds;
                        else if (typeof object.seconds === "object")
                            message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber();
                    if (object.nanos != null)
                        message.nanos = object.nanos | 0;
                    return message;
                };
    
                /**
                 * Creates a plain object from a Timestamp message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {google.protobuf.Timestamp} message Timestamp
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Timestamp.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.seconds = options.longs === String ? "0" : 0;
                        object.nanos = 0;
                    }
                    if (message.seconds != null && message.hasOwnProperty("seconds"))
                        if (typeof message.seconds === "number")
                            object.seconds = options.longs === String ? String(message.seconds) : message.seconds;
                        else
                            object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds;
                    if (message.nanos != null && message.hasOwnProperty("nanos"))
                        object.nanos = message.nanos;
                    return object;
                };
    
                /**
                 * Converts this Timestamp to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Timestamp
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Timestamp.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Timestamp
                 * @function getTypeUrl
                 * @memberof google.protobuf.Timestamp
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Timestamp";
                };
    
                return Timestamp;
            })();
    
            protobuf.DoubleValue = (function() {
    
                /**
                 * Properties of a DoubleValue.
                 * @memberof google.protobuf
                 * @interface IDoubleValue
                 * @property {number|null} [value] DoubleValue value
                 */
    
                /**
                 * Constructs a new DoubleValue.
                 * @memberof google.protobuf
                 * @classdesc Represents a DoubleValue.
                 * @implements IDoubleValue
                 * @constructor
                 * @param {google.protobuf.IDoubleValue=} [properties] Properties to set
                 */
                function DoubleValue(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * DoubleValue value.
                 * @member {number} value
                 * @memberof google.protobuf.DoubleValue
                 * @instance
                 */
                DoubleValue.prototype.value = 0;
    
                /**
                 * Creates a new DoubleValue instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {google.protobuf.IDoubleValue=} [properties] Properties to set
                 * @returns {google.protobuf.DoubleValue} DoubleValue instance
                 */
                DoubleValue.create = function create(properties) {
                    return new DoubleValue(properties);
                };
    
                /**
                 * Encodes the specified DoubleValue message. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DoubleValue.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 1 =*/9).double(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified DoubleValue message, length delimited. Does not implicitly {@link google.protobuf.DoubleValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {google.protobuf.IDoubleValue} message DoubleValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DoubleValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a DoubleValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.DoubleValue} DoubleValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DoubleValue.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DoubleValue();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.double();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a DoubleValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.DoubleValue} DoubleValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DoubleValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a DoubleValue message.
                 * @function verify
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DoubleValue.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (typeof message.value !== "number")
                            return "value: number expected";
                    return null;
                };
    
                /**
                 * Creates a DoubleValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.DoubleValue} DoubleValue
                 */
                DoubleValue.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.DoubleValue)
                        return object;
                    var message = new $root.google.protobuf.DoubleValue();
                    if (object.value != null)
                        message.value = Number(object.value);
                    return message;
                };
    
                /**
                 * Creates a plain object from a DoubleValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {google.protobuf.DoubleValue} message DoubleValue
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DoubleValue.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
                    return object;
                };
    
                /**
                 * Converts this DoubleValue to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.DoubleValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DoubleValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for DoubleValue
                 * @function getTypeUrl
                 * @memberof google.protobuf.DoubleValue
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                DoubleValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.DoubleValue";
                };
    
                return DoubleValue;
            })();
    
            protobuf.FloatValue = (function() {
    
                /**
                 * Properties of a FloatValue.
                 * @memberof google.protobuf
                 * @interface IFloatValue
                 * @property {number|null} [value] FloatValue value
                 */
    
                /**
                 * Constructs a new FloatValue.
                 * @memberof google.protobuf
                 * @classdesc Represents a FloatValue.
                 * @implements IFloatValue
                 * @constructor
                 * @param {google.protobuf.IFloatValue=} [properties] Properties to set
                 */
                function FloatValue(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * FloatValue value.
                 * @member {number} value
                 * @memberof google.protobuf.FloatValue
                 * @instance
                 */
                FloatValue.prototype.value = 0;
    
                /**
                 * Creates a new FloatValue instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {google.protobuf.IFloatValue=} [properties] Properties to set
                 * @returns {google.protobuf.FloatValue} FloatValue instance
                 */
                FloatValue.create = function create(properties) {
                    return new FloatValue(properties);
                };
    
                /**
                 * Encodes the specified FloatValue message. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FloatValue.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 5 =*/13).float(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified FloatValue message, length delimited. Does not implicitly {@link google.protobuf.FloatValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {google.protobuf.IFloatValue} message FloatValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                FloatValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a FloatValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.FloatValue} FloatValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FloatValue.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FloatValue();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.float();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a FloatValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.FloatValue} FloatValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                FloatValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a FloatValue message.
                 * @function verify
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                FloatValue.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (typeof message.value !== "number")
                            return "value: number expected";
                    return null;
                };
    
                /**
                 * Creates a FloatValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.FloatValue} FloatValue
                 */
                FloatValue.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.FloatValue)
                        return object;
                    var message = new $root.google.protobuf.FloatValue();
                    if (object.value != null)
                        message.value = Number(object.value);
                    return message;
                };
    
                /**
                 * Creates a plain object from a FloatValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {google.protobuf.FloatValue} message FloatValue
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                FloatValue.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value;
                    return object;
                };
    
                /**
                 * Converts this FloatValue to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.FloatValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                FloatValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for FloatValue
                 * @function getTypeUrl
                 * @memberof google.protobuf.FloatValue
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                FloatValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.FloatValue";
                };
    
                return FloatValue;
            })();
    
            protobuf.Int64Value = (function() {
    
                /**
                 * Properties of an Int64Value.
                 * @memberof google.protobuf
                 * @interface IInt64Value
                 * @property {number|Long|null} [value] Int64Value value
                 */
    
                /**
                 * Constructs a new Int64Value.
                 * @memberof google.protobuf
                 * @classdesc Represents an Int64Value.
                 * @implements IInt64Value
                 * @constructor
                 * @param {google.protobuf.IInt64Value=} [properties] Properties to set
                 */
                function Int64Value(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Int64Value value.
                 * @member {number|Long} value
                 * @memberof google.protobuf.Int64Value
                 * @instance
                 */
                Int64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,false) : 0;
    
                /**
                 * Creates a new Int64Value instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {google.protobuf.IInt64Value=} [properties] Properties to set
                 * @returns {google.protobuf.Int64Value} Int64Value instance
                 */
                Int64Value.create = function create(properties) {
                    return new Int64Value(properties);
                };
    
                /**
                 * Encodes the specified Int64Value message. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Int64Value.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int64(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified Int64Value message, length delimited. Does not implicitly {@link google.protobuf.Int64Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {google.protobuf.IInt64Value} message Int64Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Int64Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an Int64Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Int64Value} Int64Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Int64Value.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int64Value();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.int64();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an Int64Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Int64Value} Int64Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Int64Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an Int64Value message.
                 * @function verify
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Int64Value.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
                            return "value: integer|Long expected";
                    return null;
                };
    
                /**
                 * Creates an Int64Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Int64Value} Int64Value
                 */
                Int64Value.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Int64Value)
                        return object;
                    var message = new $root.google.protobuf.Int64Value();
                    if (object.value != null)
                        if ($util.Long)
                            (message.value = $util.Long.fromValue(object.value)).unsigned = false;
                        else if (typeof object.value === "string")
                            message.value = parseInt(object.value, 10);
                        else if (typeof object.value === "number")
                            message.value = object.value;
                        else if (typeof object.value === "object")
                            message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber();
                    return message;
                };
    
                /**
                 * Creates a plain object from an Int64Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {google.protobuf.Int64Value} message Int64Value
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Int64Value.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, false);
                            object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.value = options.longs === String ? "0" : 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (typeof message.value === "number")
                            object.value = options.longs === String ? String(message.value) : message.value;
                        else
                            object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber() : message.value;
                    return object;
                };
    
                /**
                 * Converts this Int64Value to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Int64Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Int64Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Int64Value
                 * @function getTypeUrl
                 * @memberof google.protobuf.Int64Value
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Int64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Int64Value";
                };
    
                return Int64Value;
            })();
    
            protobuf.UInt64Value = (function() {
    
                /**
                 * Properties of a UInt64Value.
                 * @memberof google.protobuf
                 * @interface IUInt64Value
                 * @property {number|Long|null} [value] UInt64Value value
                 */
    
                /**
                 * Constructs a new UInt64Value.
                 * @memberof google.protobuf
                 * @classdesc Represents a UInt64Value.
                 * @implements IUInt64Value
                 * @constructor
                 * @param {google.protobuf.IUInt64Value=} [properties] Properties to set
                 */
                function UInt64Value(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * UInt64Value value.
                 * @member {number|Long} value
                 * @memberof google.protobuf.UInt64Value
                 * @instance
                 */
                UInt64Value.prototype.value = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
    
                /**
                 * Creates a new UInt64Value instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {google.protobuf.IUInt64Value=} [properties] Properties to set
                 * @returns {google.protobuf.UInt64Value} UInt64Value instance
                 */
                UInt64Value.create = function create(properties) {
                    return new UInt64Value(properties);
                };
    
                /**
                 * Encodes the specified UInt64Value message. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UInt64Value.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified UInt64Value message, length delimited. Does not implicitly {@link google.protobuf.UInt64Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {google.protobuf.IUInt64Value} message UInt64Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UInt64Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a UInt64Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.UInt64Value} UInt64Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UInt64Value.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt64Value();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.uint64();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a UInt64Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.UInt64Value} UInt64Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UInt64Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a UInt64Value message.
                 * @function verify
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                UInt64Value.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!$util.isInteger(message.value) && !(message.value && $util.isInteger(message.value.low) && $util.isInteger(message.value.high)))
                            return "value: integer|Long expected";
                    return null;
                };
    
                /**
                 * Creates a UInt64Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.UInt64Value} UInt64Value
                 */
                UInt64Value.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.UInt64Value)
                        return object;
                    var message = new $root.google.protobuf.UInt64Value();
                    if (object.value != null)
                        if ($util.Long)
                            (message.value = $util.Long.fromValue(object.value)).unsigned = true;
                        else if (typeof object.value === "string")
                            message.value = parseInt(object.value, 10);
                        else if (typeof object.value === "number")
                            message.value = object.value;
                        else if (typeof object.value === "object")
                            message.value = new $util.LongBits(object.value.low >>> 0, object.value.high >>> 0).toNumber(true);
                    return message;
                };
    
                /**
                 * Creates a plain object from a UInt64Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {google.protobuf.UInt64Value} message UInt64Value
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                UInt64Value.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        if ($util.Long) {
                            var long = new $util.Long(0, 0, true);
                            object.value = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                        } else
                            object.value = options.longs === String ? "0" : 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (typeof message.value === "number")
                            object.value = options.longs === String ? String(message.value) : message.value;
                        else
                            object.value = options.longs === String ? $util.Long.prototype.toString.call(message.value) : options.longs === Number ? new $util.LongBits(message.value.low >>> 0, message.value.high >>> 0).toNumber(true) : message.value;
                    return object;
                };
    
                /**
                 * Converts this UInt64Value to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.UInt64Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                UInt64Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for UInt64Value
                 * @function getTypeUrl
                 * @memberof google.protobuf.UInt64Value
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                UInt64Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.UInt64Value";
                };
    
                return UInt64Value;
            })();
    
            protobuf.Int32Value = (function() {
    
                /**
                 * Properties of an Int32Value.
                 * @memberof google.protobuf
                 * @interface IInt32Value
                 * @property {number|null} [value] Int32Value value
                 */
    
                /**
                 * Constructs a new Int32Value.
                 * @memberof google.protobuf
                 * @classdesc Represents an Int32Value.
                 * @implements IInt32Value
                 * @constructor
                 * @param {google.protobuf.IInt32Value=} [properties] Properties to set
                 */
                function Int32Value(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Int32Value value.
                 * @member {number} value
                 * @memberof google.protobuf.Int32Value
                 * @instance
                 */
                Int32Value.prototype.value = 0;
    
                /**
                 * Creates a new Int32Value instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {google.protobuf.IInt32Value=} [properties] Properties to set
                 * @returns {google.protobuf.Int32Value} Int32Value instance
                 */
                Int32Value.create = function create(properties) {
                    return new Int32Value(properties);
                };
    
                /**
                 * Encodes the specified Int32Value message. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Int32Value.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified Int32Value message, length delimited. Does not implicitly {@link google.protobuf.Int32Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {google.protobuf.IInt32Value} message Int32Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Int32Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an Int32Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.Int32Value} Int32Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Int32Value.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Int32Value();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.int32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an Int32Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.Int32Value} Int32Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Int32Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an Int32Value message.
                 * @function verify
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Int32Value.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!$util.isInteger(message.value))
                            return "value: integer expected";
                    return null;
                };
    
                /**
                 * Creates an Int32Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.Int32Value} Int32Value
                 */
                Int32Value.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.Int32Value)
                        return object;
                    var message = new $root.google.protobuf.Int32Value();
                    if (object.value != null)
                        message.value = object.value | 0;
                    return message;
                };
    
                /**
                 * Creates a plain object from an Int32Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {google.protobuf.Int32Value} message Int32Value
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Int32Value.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = message.value;
                    return object;
                };
    
                /**
                 * Converts this Int32Value to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.Int32Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Int32Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Int32Value
                 * @function getTypeUrl
                 * @memberof google.protobuf.Int32Value
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Int32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.Int32Value";
                };
    
                return Int32Value;
            })();
    
            protobuf.UInt32Value = (function() {
    
                /**
                 * Properties of a UInt32Value.
                 * @memberof google.protobuf
                 * @interface IUInt32Value
                 * @property {number|null} [value] UInt32Value value
                 */
    
                /**
                 * Constructs a new UInt32Value.
                 * @memberof google.protobuf
                 * @classdesc Represents a UInt32Value.
                 * @implements IUInt32Value
                 * @constructor
                 * @param {google.protobuf.IUInt32Value=} [properties] Properties to set
                 */
                function UInt32Value(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * UInt32Value value.
                 * @member {number} value
                 * @memberof google.protobuf.UInt32Value
                 * @instance
                 */
                UInt32Value.prototype.value = 0;
    
                /**
                 * Creates a new UInt32Value instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {google.protobuf.IUInt32Value=} [properties] Properties to set
                 * @returns {google.protobuf.UInt32Value} UInt32Value instance
                 */
                UInt32Value.create = function create(properties) {
                    return new UInt32Value(properties);
                };
    
                /**
                 * Encodes the specified UInt32Value message. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UInt32Value.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified UInt32Value message, length delimited. Does not implicitly {@link google.protobuf.UInt32Value.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {google.protobuf.IUInt32Value} message UInt32Value message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                UInt32Value.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a UInt32Value message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.UInt32Value} UInt32Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UInt32Value.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UInt32Value();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.uint32();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a UInt32Value message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.UInt32Value} UInt32Value
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                UInt32Value.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a UInt32Value message.
                 * @function verify
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                UInt32Value.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!$util.isInteger(message.value))
                            return "value: integer expected";
                    return null;
                };
    
                /**
                 * Creates a UInt32Value message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.UInt32Value} UInt32Value
                 */
                UInt32Value.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.UInt32Value)
                        return object;
                    var message = new $root.google.protobuf.UInt32Value();
                    if (object.value != null)
                        message.value = object.value >>> 0;
                    return message;
                };
    
                /**
                 * Creates a plain object from a UInt32Value message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {google.protobuf.UInt32Value} message UInt32Value
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                UInt32Value.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = 0;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = message.value;
                    return object;
                };
    
                /**
                 * Converts this UInt32Value to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.UInt32Value
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                UInt32Value.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for UInt32Value
                 * @function getTypeUrl
                 * @memberof google.protobuf.UInt32Value
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                UInt32Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.UInt32Value";
                };
    
                return UInt32Value;
            })();
    
            protobuf.BoolValue = (function() {
    
                /**
                 * Properties of a BoolValue.
                 * @memberof google.protobuf
                 * @interface IBoolValue
                 * @property {boolean|null} [value] BoolValue value
                 */
    
                /**
                 * Constructs a new BoolValue.
                 * @memberof google.protobuf
                 * @classdesc Represents a BoolValue.
                 * @implements IBoolValue
                 * @constructor
                 * @param {google.protobuf.IBoolValue=} [properties] Properties to set
                 */
                function BoolValue(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * BoolValue value.
                 * @member {boolean} value
                 * @memberof google.protobuf.BoolValue
                 * @instance
                 */
                BoolValue.prototype.value = false;
    
                /**
                 * Creates a new BoolValue instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {google.protobuf.IBoolValue=} [properties] Properties to set
                 * @returns {google.protobuf.BoolValue} BoolValue instance
                 */
                BoolValue.create = function create(properties) {
                    return new BoolValue(properties);
                };
    
                /**
                 * Encodes the specified BoolValue message. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BoolValue.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 0 =*/8).bool(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified BoolValue message, length delimited. Does not implicitly {@link google.protobuf.BoolValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {google.protobuf.IBoolValue} message BoolValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BoolValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a BoolValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.BoolValue} BoolValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BoolValue.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BoolValue();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.bool();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a BoolValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.BoolValue} BoolValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BoolValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a BoolValue message.
                 * @function verify
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BoolValue.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (typeof message.value !== "boolean")
                            return "value: boolean expected";
                    return null;
                };
    
                /**
                 * Creates a BoolValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.BoolValue} BoolValue
                 */
                BoolValue.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.BoolValue)
                        return object;
                    var message = new $root.google.protobuf.BoolValue();
                    if (object.value != null)
                        message.value = Boolean(object.value);
                    return message;
                };
    
                /**
                 * Creates a plain object from a BoolValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {google.protobuf.BoolValue} message BoolValue
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BoolValue.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = false;
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = message.value;
                    return object;
                };
    
                /**
                 * Converts this BoolValue to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.BoolValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BoolValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for BoolValue
                 * @function getTypeUrl
                 * @memberof google.protobuf.BoolValue
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                BoolValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.BoolValue";
                };
    
                return BoolValue;
            })();
    
            protobuf.StringValue = (function() {
    
                /**
                 * Properties of a StringValue.
                 * @memberof google.protobuf
                 * @interface IStringValue
                 * @property {string|null} [value] StringValue value
                 */
    
                /**
                 * Constructs a new StringValue.
                 * @memberof google.protobuf
                 * @classdesc Represents a StringValue.
                 * @implements IStringValue
                 * @constructor
                 * @param {google.protobuf.IStringValue=} [properties] Properties to set
                 */
                function StringValue(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * StringValue value.
                 * @member {string} value
                 * @memberof google.protobuf.StringValue
                 * @instance
                 */
                StringValue.prototype.value = "";
    
                /**
                 * Creates a new StringValue instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {google.protobuf.IStringValue=} [properties] Properties to set
                 * @returns {google.protobuf.StringValue} StringValue instance
                 */
                StringValue.create = function create(properties) {
                    return new StringValue(properties);
                };
    
                /**
                 * Encodes the specified StringValue message. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                StringValue.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified StringValue message, length delimited. Does not implicitly {@link google.protobuf.StringValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {google.protobuf.IStringValue} message StringValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                StringValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a StringValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.StringValue} StringValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                StringValue.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.StringValue();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a StringValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.StringValue} StringValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                StringValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a StringValue message.
                 * @function verify
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                StringValue.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!$util.isString(message.value))
                            return "value: string expected";
                    return null;
                };
    
                /**
                 * Creates a StringValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.StringValue} StringValue
                 */
                StringValue.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.StringValue)
                        return object;
                    var message = new $root.google.protobuf.StringValue();
                    if (object.value != null)
                        message.value = String(object.value);
                    return message;
                };
    
                /**
                 * Creates a plain object from a StringValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {google.protobuf.StringValue} message StringValue
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                StringValue.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.value = "";
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = message.value;
                    return object;
                };
    
                /**
                 * Converts this StringValue to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.StringValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                StringValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for StringValue
                 * @function getTypeUrl
                 * @memberof google.protobuf.StringValue
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                StringValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.StringValue";
                };
    
                return StringValue;
            })();
    
            protobuf.BytesValue = (function() {
    
                /**
                 * Properties of a BytesValue.
                 * @memberof google.protobuf
                 * @interface IBytesValue
                 * @property {Uint8Array|null} [value] BytesValue value
                 */
    
                /**
                 * Constructs a new BytesValue.
                 * @memberof google.protobuf
                 * @classdesc Represents a BytesValue.
                 * @implements IBytesValue
                 * @constructor
                 * @param {google.protobuf.IBytesValue=} [properties] Properties to set
                 */
                function BytesValue(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * BytesValue value.
                 * @member {Uint8Array} value
                 * @memberof google.protobuf.BytesValue
                 * @instance
                 */
                BytesValue.prototype.value = $util.newBuffer([]);
    
                /**
                 * Creates a new BytesValue instance using the specified properties.
                 * @function create
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {google.protobuf.IBytesValue=} [properties] Properties to set
                 * @returns {google.protobuf.BytesValue} BytesValue instance
                 */
                BytesValue.create = function create(properties) {
                    return new BytesValue(properties);
                };
    
                /**
                 * Encodes the specified BytesValue message. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
                 * @function encode
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BytesValue.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.value != null && Object.hasOwnProperty.call(message, "value"))
                        writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.value);
                    return writer;
                };
    
                /**
                 * Encodes the specified BytesValue message, length delimited. Does not implicitly {@link google.protobuf.BytesValue.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {google.protobuf.IBytesValue} message BytesValue message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                BytesValue.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a BytesValue message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.protobuf.BytesValue} BytesValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BytesValue.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.BytesValue();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.value = reader.bytes();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a BytesValue message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.protobuf.BytesValue} BytesValue
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                BytesValue.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a BytesValue message.
                 * @function verify
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                BytesValue.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.value != null && message.hasOwnProperty("value"))
                        if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value)))
                            return "value: buffer expected";
                    return null;
                };
    
                /**
                 * Creates a BytesValue message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.protobuf.BytesValue} BytesValue
                 */
                BytesValue.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.protobuf.BytesValue)
                        return object;
                    var message = new $root.google.protobuf.BytesValue();
                    if (object.value != null)
                        if (typeof object.value === "string")
                            $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0);
                        else if (object.value.length >= 0)
                            message.value = object.value;
                    return message;
                };
    
                /**
                 * Creates a plain object from a BytesValue message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {google.protobuf.BytesValue} message BytesValue
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                BytesValue.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        if (options.bytes === String)
                            object.value = "";
                        else {
                            object.value = [];
                            if (options.bytes !== Array)
                                object.value = $util.newBuffer(object.value);
                        }
                    if (message.value != null && message.hasOwnProperty("value"))
                        object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value;
                    return object;
                };
    
                /**
                 * Converts this BytesValue to JSON.
                 * @function toJSON
                 * @memberof google.protobuf.BytesValue
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                BytesValue.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for BytesValue
                 * @function getTypeUrl
                 * @memberof google.protobuf.BytesValue
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                BytesValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.protobuf.BytesValue";
                };
    
                return BytesValue;
            })();
    
            return protobuf;
        })();
    
        google.longrunning = (function() {
    
            /**
             * Namespace longrunning.
             * @memberof google
             * @namespace
             */
            var longrunning = {};
    
            longrunning.Operations = (function() {
    
                /**
                 * Constructs a new Operations service.
                 * @memberof google.longrunning
                 * @classdesc Represents an Operations
                 * @extends $protobuf.rpc.Service
                 * @constructor
                 * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                 * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                 * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                 */
                function Operations(rpcImpl, requestDelimited, responseDelimited) {
                    $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited);
                }
    
                (Operations.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = Operations;
    
                /**
                 * Creates new Operations service using the specified rpc implementation.
                 * @function create
                 * @memberof google.longrunning.Operations
                 * @static
                 * @param {$protobuf.RPCImpl} rpcImpl RPC implementation
                 * @param {boolean} [requestDelimited=false] Whether requests are length-delimited
                 * @param {boolean} [responseDelimited=false] Whether responses are length-delimited
                 * @returns {Operations} RPC service. Useful where requests and/or responses are streamed.
                 */
                Operations.create = function create(rpcImpl, requestDelimited, responseDelimited) {
                    return new this(rpcImpl, requestDelimited, responseDelimited);
                };
    
                /**
                 * Callback as used by {@link google.longrunning.Operations|listOperations}.
                 * @memberof google.longrunning.Operations
                 * @typedef ListOperationsCallback
                 * @type {function}
                 * @param {Error|null} error Error, if any
                 * @param {google.longrunning.ListOperationsResponse} [response] ListOperationsResponse
                 */
    
                /**
                 * Calls ListOperations.
                 * @function listOperations
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
                 * @param {google.longrunning.Operations.ListOperationsCallback} callback Node-style callback called with the error, if any, and ListOperationsResponse
                 * @returns {undefined}
                 * @variation 1
                 */
                Object.defineProperty(Operations.prototype.listOperations = function listOperations(request, callback) {
                    return this.rpcCall(listOperations, $root.google.longrunning.ListOperationsRequest, $root.google.longrunning.ListOperationsResponse, request, callback);
                }, "name", { value: "ListOperations" });
    
                /**
                 * Calls ListOperations.
                 * @function listOperations
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IListOperationsRequest} request ListOperationsRequest message or plain object
                 * @returns {Promise<google.longrunning.ListOperationsResponse>} Promise
                 * @variation 2
                 */
    
                /**
                 * Callback as used by {@link google.longrunning.Operations|getOperation}.
                 * @memberof google.longrunning.Operations
                 * @typedef GetOperationCallback
                 * @type {function}
                 * @param {Error|null} error Error, if any
                 * @param {google.longrunning.Operation} [response] Operation
                 */
    
                /**
                 * Calls GetOperation.
                 * @function getOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
                 * @param {google.longrunning.Operations.GetOperationCallback} callback Node-style callback called with the error, if any, and Operation
                 * @returns {undefined}
                 * @variation 1
                 */
                Object.defineProperty(Operations.prototype.getOperation = function getOperation(request, callback) {
                    return this.rpcCall(getOperation, $root.google.longrunning.GetOperationRequest, $root.google.longrunning.Operation, request, callback);
                }, "name", { value: "GetOperation" });
    
                /**
                 * Calls GetOperation.
                 * @function getOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IGetOperationRequest} request GetOperationRequest message or plain object
                 * @returns {Promise<google.longrunning.Operation>} Promise
                 * @variation 2
                 */
    
                /**
                 * Callback as used by {@link google.longrunning.Operations|deleteOperation}.
                 * @memberof google.longrunning.Operations
                 * @typedef DeleteOperationCallback
                 * @type {function}
                 * @param {Error|null} error Error, if any
                 * @param {google.protobuf.Empty} [response] Empty
                 */
    
                /**
                 * Calls DeleteOperation.
                 * @function deleteOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
                 * @param {google.longrunning.Operations.DeleteOperationCallback} callback Node-style callback called with the error, if any, and Empty
                 * @returns {undefined}
                 * @variation 1
                 */
                Object.defineProperty(Operations.prototype.deleteOperation = function deleteOperation(request, callback) {
                    return this.rpcCall(deleteOperation, $root.google.longrunning.DeleteOperationRequest, $root.google.protobuf.Empty, request, callback);
                }, "name", { value: "DeleteOperation" });
    
                /**
                 * Calls DeleteOperation.
                 * @function deleteOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IDeleteOperationRequest} request DeleteOperationRequest message or plain object
                 * @returns {Promise<google.protobuf.Empty>} Promise
                 * @variation 2
                 */
    
                /**
                 * Callback as used by {@link google.longrunning.Operations|cancelOperation}.
                 * @memberof google.longrunning.Operations
                 * @typedef CancelOperationCallback
                 * @type {function}
                 * @param {Error|null} error Error, if any
                 * @param {google.protobuf.Empty} [response] Empty
                 */
    
                /**
                 * Calls CancelOperation.
                 * @function cancelOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
                 * @param {google.longrunning.Operations.CancelOperationCallback} callback Node-style callback called with the error, if any, and Empty
                 * @returns {undefined}
                 * @variation 1
                 */
                Object.defineProperty(Operations.prototype.cancelOperation = function cancelOperation(request, callback) {
                    return this.rpcCall(cancelOperation, $root.google.longrunning.CancelOperationRequest, $root.google.protobuf.Empty, request, callback);
                }, "name", { value: "CancelOperation" });
    
                /**
                 * Calls CancelOperation.
                 * @function cancelOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.ICancelOperationRequest} request CancelOperationRequest message or plain object
                 * @returns {Promise<google.protobuf.Empty>} Promise
                 * @variation 2
                 */
    
                /**
                 * Callback as used by {@link google.longrunning.Operations|waitOperation}.
                 * @memberof google.longrunning.Operations
                 * @typedef WaitOperationCallback
                 * @type {function}
                 * @param {Error|null} error Error, if any
                 * @param {google.longrunning.Operation} [response] Operation
                 */
    
                /**
                 * Calls WaitOperation.
                 * @function waitOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
                 * @param {google.longrunning.Operations.WaitOperationCallback} callback Node-style callback called with the error, if any, and Operation
                 * @returns {undefined}
                 * @variation 1
                 */
                Object.defineProperty(Operations.prototype.waitOperation = function waitOperation(request, callback) {
                    return this.rpcCall(waitOperation, $root.google.longrunning.WaitOperationRequest, $root.google.longrunning.Operation, request, callback);
                }, "name", { value: "WaitOperation" });
    
                /**
                 * Calls WaitOperation.
                 * @function waitOperation
                 * @memberof google.longrunning.Operations
                 * @instance
                 * @param {google.longrunning.IWaitOperationRequest} request WaitOperationRequest message or plain object
                 * @returns {Promise<google.longrunning.Operation>} Promise
                 * @variation 2
                 */
    
                return Operations;
            })();
    
            longrunning.Operation = (function() {
    
                /**
                 * Properties of an Operation.
                 * @memberof google.longrunning
                 * @interface IOperation
                 * @property {string|null} [name] Operation name
                 * @property {google.protobuf.IAny|null} [metadata] Operation metadata
                 * @property {boolean|null} [done] Operation done
                 * @property {google.rpc.IStatus|null} [error] Operation error
                 * @property {google.protobuf.IAny|null} [response] Operation response
                 */
    
                /**
                 * Constructs a new Operation.
                 * @memberof google.longrunning
                 * @classdesc Represents an Operation.
                 * @implements IOperation
                 * @constructor
                 * @param {google.longrunning.IOperation=} [properties] Properties to set
                 */
                function Operation(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Operation name.
                 * @member {string} name
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Operation.prototype.name = "";
    
                /**
                 * Operation metadata.
                 * @member {google.protobuf.IAny|null|undefined} metadata
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Operation.prototype.metadata = null;
    
                /**
                 * Operation done.
                 * @member {boolean} done
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Operation.prototype.done = false;
    
                /**
                 * Operation error.
                 * @member {google.rpc.IStatus|null|undefined} error
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Operation.prototype.error = null;
    
                /**
                 * Operation response.
                 * @member {google.protobuf.IAny|null|undefined} response
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Operation.prototype.response = null;
    
                // OneOf field names bound to virtual getters and setters
                var $oneOfFields;
    
                /**
                 * Operation result.
                 * @member {"error"|"response"|undefined} result
                 * @memberof google.longrunning.Operation
                 * @instance
                 */
                Object.defineProperty(Operation.prototype, "result", {
                    get: $util.oneOfGetter($oneOfFields = ["error", "response"]),
                    set: $util.oneOfSetter($oneOfFields)
                });
    
                /**
                 * Creates a new Operation instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {google.longrunning.IOperation=} [properties] Properties to set
                 * @returns {google.longrunning.Operation} Operation instance
                 */
                Operation.create = function create(properties) {
                    return new Operation(properties);
                };
    
                /**
                 * Encodes the specified Operation message. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {google.longrunning.IOperation} message Operation message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Operation.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
                        $root.google.protobuf.Any.encode(message.metadata, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    if (message.done != null && Object.hasOwnProperty.call(message, "done"))
                        writer.uint32(/* id 3, wireType 0 =*/24).bool(message.done);
                    if (message.error != null && Object.hasOwnProperty.call(message, "error"))
                        $root.google.rpc.Status.encode(message.error, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    if (message.response != null && Object.hasOwnProperty.call(message, "response"))
                        $root.google.protobuf.Any.encode(message.response, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified Operation message, length delimited. Does not implicitly {@link google.longrunning.Operation.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {google.longrunning.IOperation} message Operation message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Operation.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an Operation message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.Operation} Operation
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Operation.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.Operation();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.metadata = $root.google.protobuf.Any.decode(reader, reader.uint32());
                                break;
                            }
                        case 3: {
                                message.done = reader.bool();
                                break;
                            }
                        case 4: {
                                message.error = $root.google.rpc.Status.decode(reader, reader.uint32());
                                break;
                            }
                        case 5: {
                                message.response = $root.google.protobuf.Any.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an Operation message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.Operation} Operation
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Operation.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an Operation message.
                 * @function verify
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Operation.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    var properties = {};
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.metadata != null && message.hasOwnProperty("metadata")) {
                        var error = $root.google.protobuf.Any.verify(message.metadata);
                        if (error)
                            return "metadata." + error;
                    }
                    if (message.done != null && message.hasOwnProperty("done"))
                        if (typeof message.done !== "boolean")
                            return "done: boolean expected";
                    if (message.error != null && message.hasOwnProperty("error")) {
                        properties.result = 1;
                        {
                            var error = $root.google.rpc.Status.verify(message.error);
                            if (error)
                                return "error." + error;
                        }
                    }
                    if (message.response != null && message.hasOwnProperty("response")) {
                        if (properties.result === 1)
                            return "result: multiple values";
                        properties.result = 1;
                        {
                            var error = $root.google.protobuf.Any.verify(message.response);
                            if (error)
                                return "response." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates an Operation message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.Operation} Operation
                 */
                Operation.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.Operation)
                        return object;
                    var message = new $root.google.longrunning.Operation();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.metadata != null) {
                        if (typeof object.metadata !== "object")
                            throw TypeError(".google.longrunning.Operation.metadata: object expected");
                        message.metadata = $root.google.protobuf.Any.fromObject(object.metadata);
                    }
                    if (object.done != null)
                        message.done = Boolean(object.done);
                    if (object.error != null) {
                        if (typeof object.error !== "object")
                            throw TypeError(".google.longrunning.Operation.error: object expected");
                        message.error = $root.google.rpc.Status.fromObject(object.error);
                    }
                    if (object.response != null) {
                        if (typeof object.response !== "object")
                            throw TypeError(".google.longrunning.Operation.response: object expected");
                        message.response = $root.google.protobuf.Any.fromObject(object.response);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from an Operation message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {google.longrunning.Operation} message Operation
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Operation.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.metadata = null;
                        object.done = false;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.metadata != null && message.hasOwnProperty("metadata"))
                        object.metadata = $root.google.protobuf.Any.toObject(message.metadata, options);
                    if (message.done != null && message.hasOwnProperty("done"))
                        object.done = message.done;
                    if (message.error != null && message.hasOwnProperty("error")) {
                        object.error = $root.google.rpc.Status.toObject(message.error, options);
                        if (options.oneofs)
                            object.result = "error";
                    }
                    if (message.response != null && message.hasOwnProperty("response")) {
                        object.response = $root.google.protobuf.Any.toObject(message.response, options);
                        if (options.oneofs)
                            object.result = "response";
                    }
                    return object;
                };
    
                /**
                 * Converts this Operation to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.Operation
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Operation.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Operation
                 * @function getTypeUrl
                 * @memberof google.longrunning.Operation
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Operation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.Operation";
                };
    
                return Operation;
            })();
    
            longrunning.GetOperationRequest = (function() {
    
                /**
                 * Properties of a GetOperationRequest.
                 * @memberof google.longrunning
                 * @interface IGetOperationRequest
                 * @property {string|null} [name] GetOperationRequest name
                 */
    
                /**
                 * Constructs a new GetOperationRequest.
                 * @memberof google.longrunning
                 * @classdesc Represents a GetOperationRequest.
                 * @implements IGetOperationRequest
                 * @constructor
                 * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
                 */
                function GetOperationRequest(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * GetOperationRequest name.
                 * @member {string} name
                 * @memberof google.longrunning.GetOperationRequest
                 * @instance
                 */
                GetOperationRequest.prototype.name = "";
    
                /**
                 * Creates a new GetOperationRequest instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {google.longrunning.IGetOperationRequest=} [properties] Properties to set
                 * @returns {google.longrunning.GetOperationRequest} GetOperationRequest instance
                 */
                GetOperationRequest.create = function create(properties) {
                    return new GetOperationRequest(properties);
                };
    
                /**
                 * Encodes the specified GetOperationRequest message. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GetOperationRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    return writer;
                };
    
                /**
                 * Encodes the specified GetOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.GetOperationRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {google.longrunning.IGetOperationRequest} message GetOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                GetOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a GetOperationRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GetOperationRequest.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.GetOperationRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a GetOperationRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                GetOperationRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a GetOperationRequest message.
                 * @function verify
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                GetOperationRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    return null;
                };
    
                /**
                 * Creates a GetOperationRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.GetOperationRequest} GetOperationRequest
                 */
                GetOperationRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.GetOperationRequest)
                        return object;
                    var message = new $root.google.longrunning.GetOperationRequest();
                    if (object.name != null)
                        message.name = String(object.name);
                    return message;
                };
    
                /**
                 * Creates a plain object from a GetOperationRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {google.longrunning.GetOperationRequest} message GetOperationRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                GetOperationRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.name = "";
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    return object;
                };
    
                /**
                 * Converts this GetOperationRequest to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.GetOperationRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                GetOperationRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for GetOperationRequest
                 * @function getTypeUrl
                 * @memberof google.longrunning.GetOperationRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                GetOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.GetOperationRequest";
                };
    
                return GetOperationRequest;
            })();
    
            longrunning.ListOperationsRequest = (function() {
    
                /**
                 * Properties of a ListOperationsRequest.
                 * @memberof google.longrunning
                 * @interface IListOperationsRequest
                 * @property {string|null} [name] ListOperationsRequest name
                 * @property {string|null} [filter] ListOperationsRequest filter
                 * @property {number|null} [pageSize] ListOperationsRequest pageSize
                 * @property {string|null} [pageToken] ListOperationsRequest pageToken
                 */
    
                /**
                 * Constructs a new ListOperationsRequest.
                 * @memberof google.longrunning
                 * @classdesc Represents a ListOperationsRequest.
                 * @implements IListOperationsRequest
                 * @constructor
                 * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
                 */
                function ListOperationsRequest(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ListOperationsRequest name.
                 * @member {string} name
                 * @memberof google.longrunning.ListOperationsRequest
                 * @instance
                 */
                ListOperationsRequest.prototype.name = "";
    
                /**
                 * ListOperationsRequest filter.
                 * @member {string} filter
                 * @memberof google.longrunning.ListOperationsRequest
                 * @instance
                 */
                ListOperationsRequest.prototype.filter = "";
    
                /**
                 * ListOperationsRequest pageSize.
                 * @member {number} pageSize
                 * @memberof google.longrunning.ListOperationsRequest
                 * @instance
                 */
                ListOperationsRequest.prototype.pageSize = 0;
    
                /**
                 * ListOperationsRequest pageToken.
                 * @member {string} pageToken
                 * @memberof google.longrunning.ListOperationsRequest
                 * @instance
                 */
                ListOperationsRequest.prototype.pageToken = "";
    
                /**
                 * Creates a new ListOperationsRequest instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {google.longrunning.IListOperationsRequest=} [properties] Properties to set
                 * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest instance
                 */
                ListOperationsRequest.create = function create(properties) {
                    return new ListOperationsRequest(properties);
                };
    
                /**
                 * Encodes the specified ListOperationsRequest message. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ListOperationsRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.filter != null && Object.hasOwnProperty.call(message, "filter"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.filter);
                    if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize"))
                        writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize);
                    if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken"))
                        writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken);
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 4, wireType 2 =*/34).string(message.name);
                    return writer;
                };
    
                /**
                 * Encodes the specified ListOperationsRequest message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {google.longrunning.IListOperationsRequest} message ListOperationsRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ListOperationsRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ListOperationsRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ListOperationsRequest.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 4: {
                                message.name = reader.string();
                                break;
                            }
                        case 1: {
                                message.filter = reader.string();
                                break;
                            }
                        case 2: {
                                message.pageSize = reader.int32();
                                break;
                            }
                        case 3: {
                                message.pageToken = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ListOperationsRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ListOperationsRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ListOperationsRequest message.
                 * @function verify
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ListOperationsRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.filter != null && message.hasOwnProperty("filter"))
                        if (!$util.isString(message.filter))
                            return "filter: string expected";
                    if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                        if (!$util.isInteger(message.pageSize))
                            return "pageSize: integer expected";
                    if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                        if (!$util.isString(message.pageToken))
                            return "pageToken: string expected";
                    return null;
                };
    
                /**
                 * Creates a ListOperationsRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.ListOperationsRequest} ListOperationsRequest
                 */
                ListOperationsRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.ListOperationsRequest)
                        return object;
                    var message = new $root.google.longrunning.ListOperationsRequest();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.filter != null)
                        message.filter = String(object.filter);
                    if (object.pageSize != null)
                        message.pageSize = object.pageSize | 0;
                    if (object.pageToken != null)
                        message.pageToken = String(object.pageToken);
                    return message;
                };
    
                /**
                 * Creates a plain object from a ListOperationsRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {google.longrunning.ListOperationsRequest} message ListOperationsRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ListOperationsRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.filter = "";
                        object.pageSize = 0;
                        object.pageToken = "";
                        object.name = "";
                    }
                    if (message.filter != null && message.hasOwnProperty("filter"))
                        object.filter = message.filter;
                    if (message.pageSize != null && message.hasOwnProperty("pageSize"))
                        object.pageSize = message.pageSize;
                    if (message.pageToken != null && message.hasOwnProperty("pageToken"))
                        object.pageToken = message.pageToken;
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    return object;
                };
    
                /**
                 * Converts this ListOperationsRequest to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.ListOperationsRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ListOperationsRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ListOperationsRequest
                 * @function getTypeUrl
                 * @memberof google.longrunning.ListOperationsRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ListOperationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.ListOperationsRequest";
                };
    
                return ListOperationsRequest;
            })();
    
            longrunning.ListOperationsResponse = (function() {
    
                /**
                 * Properties of a ListOperationsResponse.
                 * @memberof google.longrunning
                 * @interface IListOperationsResponse
                 * @property {Array.<google.longrunning.IOperation>|null} [operations] ListOperationsResponse operations
                 * @property {string|null} [nextPageToken] ListOperationsResponse nextPageToken
                 */
    
                /**
                 * Constructs a new ListOperationsResponse.
                 * @memberof google.longrunning
                 * @classdesc Represents a ListOperationsResponse.
                 * @implements IListOperationsResponse
                 * @constructor
                 * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
                 */
                function ListOperationsResponse(properties) {
                    this.operations = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * ListOperationsResponse operations.
                 * @member {Array.<google.longrunning.IOperation>} operations
                 * @memberof google.longrunning.ListOperationsResponse
                 * @instance
                 */
                ListOperationsResponse.prototype.operations = $util.emptyArray;
    
                /**
                 * ListOperationsResponse nextPageToken.
                 * @member {string} nextPageToken
                 * @memberof google.longrunning.ListOperationsResponse
                 * @instance
                 */
                ListOperationsResponse.prototype.nextPageToken = "";
    
                /**
                 * Creates a new ListOperationsResponse instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {google.longrunning.IListOperationsResponse=} [properties] Properties to set
                 * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse instance
                 */
                ListOperationsResponse.create = function create(properties) {
                    return new ListOperationsResponse(properties);
                };
    
                /**
                 * Encodes the specified ListOperationsResponse message. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ListOperationsResponse.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.operations != null && message.operations.length)
                        for (var i = 0; i < message.operations.length; ++i)
                            $root.google.longrunning.Operation.encode(message.operations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                    if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken);
                    return writer;
                };
    
                /**
                 * Encodes the specified ListOperationsResponse message, length delimited. Does not implicitly {@link google.longrunning.ListOperationsResponse.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {google.longrunning.IListOperationsResponse} message ListOperationsResponse message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                ListOperationsResponse.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a ListOperationsResponse message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ListOperationsResponse.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.ListOperationsResponse();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                if (!(message.operations && message.operations.length))
                                    message.operations = [];
                                message.operations.push($root.google.longrunning.Operation.decode(reader, reader.uint32()));
                                break;
                            }
                        case 2: {
                                message.nextPageToken = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a ListOperationsResponse message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                ListOperationsResponse.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a ListOperationsResponse message.
                 * @function verify
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                ListOperationsResponse.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.operations != null && message.hasOwnProperty("operations")) {
                        if (!Array.isArray(message.operations))
                            return "operations: array expected";
                        for (var i = 0; i < message.operations.length; ++i) {
                            var error = $root.google.longrunning.Operation.verify(message.operations[i]);
                            if (error)
                                return "operations." + error;
                        }
                    }
                    if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                        if (!$util.isString(message.nextPageToken))
                            return "nextPageToken: string expected";
                    return null;
                };
    
                /**
                 * Creates a ListOperationsResponse message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.ListOperationsResponse} ListOperationsResponse
                 */
                ListOperationsResponse.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.ListOperationsResponse)
                        return object;
                    var message = new $root.google.longrunning.ListOperationsResponse();
                    if (object.operations) {
                        if (!Array.isArray(object.operations))
                            throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");
                        message.operations = [];
                        for (var i = 0; i < object.operations.length; ++i) {
                            if (typeof object.operations[i] !== "object")
                                throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");
                            message.operations[i] = $root.google.longrunning.Operation.fromObject(object.operations[i]);
                        }
                    }
                    if (object.nextPageToken != null)
                        message.nextPageToken = String(object.nextPageToken);
                    return message;
                };
    
                /**
                 * Creates a plain object from a ListOperationsResponse message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {google.longrunning.ListOperationsResponse} message ListOperationsResponse
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                ListOperationsResponse.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.operations = [];
                    if (options.defaults)
                        object.nextPageToken = "";
                    if (message.operations && message.operations.length) {
                        object.operations = [];
                        for (var j = 0; j < message.operations.length; ++j)
                            object.operations[j] = $root.google.longrunning.Operation.toObject(message.operations[j], options);
                    }
                    if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken"))
                        object.nextPageToken = message.nextPageToken;
                    return object;
                };
    
                /**
                 * Converts this ListOperationsResponse to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.ListOperationsResponse
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                ListOperationsResponse.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for ListOperationsResponse
                 * @function getTypeUrl
                 * @memberof google.longrunning.ListOperationsResponse
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                ListOperationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.ListOperationsResponse";
                };
    
                return ListOperationsResponse;
            })();
    
            longrunning.CancelOperationRequest = (function() {
    
                /**
                 * Properties of a CancelOperationRequest.
                 * @memberof google.longrunning
                 * @interface ICancelOperationRequest
                 * @property {string|null} [name] CancelOperationRequest name
                 */
    
                /**
                 * Constructs a new CancelOperationRequest.
                 * @memberof google.longrunning
                 * @classdesc Represents a CancelOperationRequest.
                 * @implements ICancelOperationRequest
                 * @constructor
                 * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
                 */
                function CancelOperationRequest(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * CancelOperationRequest name.
                 * @member {string} name
                 * @memberof google.longrunning.CancelOperationRequest
                 * @instance
                 */
                CancelOperationRequest.prototype.name = "";
    
                /**
                 * Creates a new CancelOperationRequest instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {google.longrunning.ICancelOperationRequest=} [properties] Properties to set
                 * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest instance
                 */
                CancelOperationRequest.create = function create(properties) {
                    return new CancelOperationRequest(properties);
                };
    
                /**
                 * Encodes the specified CancelOperationRequest message. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CancelOperationRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    return writer;
                };
    
                /**
                 * Encodes the specified CancelOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.CancelOperationRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {google.longrunning.ICancelOperationRequest} message CancelOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                CancelOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a CancelOperationRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CancelOperationRequest.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.CancelOperationRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a CancelOperationRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                CancelOperationRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a CancelOperationRequest message.
                 * @function verify
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                CancelOperationRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    return null;
                };
    
                /**
                 * Creates a CancelOperationRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.CancelOperationRequest} CancelOperationRequest
                 */
                CancelOperationRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.CancelOperationRequest)
                        return object;
                    var message = new $root.google.longrunning.CancelOperationRequest();
                    if (object.name != null)
                        message.name = String(object.name);
                    return message;
                };
    
                /**
                 * Creates a plain object from a CancelOperationRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {google.longrunning.CancelOperationRequest} message CancelOperationRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                CancelOperationRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.name = "";
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    return object;
                };
    
                /**
                 * Converts this CancelOperationRequest to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.CancelOperationRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                CancelOperationRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for CancelOperationRequest
                 * @function getTypeUrl
                 * @memberof google.longrunning.CancelOperationRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                CancelOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.CancelOperationRequest";
                };
    
                return CancelOperationRequest;
            })();
    
            longrunning.DeleteOperationRequest = (function() {
    
                /**
                 * Properties of a DeleteOperationRequest.
                 * @memberof google.longrunning
                 * @interface IDeleteOperationRequest
                 * @property {string|null} [name] DeleteOperationRequest name
                 */
    
                /**
                 * Constructs a new DeleteOperationRequest.
                 * @memberof google.longrunning
                 * @classdesc Represents a DeleteOperationRequest.
                 * @implements IDeleteOperationRequest
                 * @constructor
                 * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
                 */
                function DeleteOperationRequest(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * DeleteOperationRequest name.
                 * @member {string} name
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @instance
                 */
                DeleteOperationRequest.prototype.name = "";
    
                /**
                 * Creates a new DeleteOperationRequest instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {google.longrunning.IDeleteOperationRequest=} [properties] Properties to set
                 * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest instance
                 */
                DeleteOperationRequest.create = function create(properties) {
                    return new DeleteOperationRequest(properties);
                };
    
                /**
                 * Encodes the specified DeleteOperationRequest message. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DeleteOperationRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    return writer;
                };
    
                /**
                 * Encodes the specified DeleteOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.DeleteOperationRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {google.longrunning.IDeleteOperationRequest} message DeleteOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                DeleteOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a DeleteOperationRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DeleteOperationRequest.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.DeleteOperationRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a DeleteOperationRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                DeleteOperationRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a DeleteOperationRequest message.
                 * @function verify
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                DeleteOperationRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    return null;
                };
    
                /**
                 * Creates a DeleteOperationRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.DeleteOperationRequest} DeleteOperationRequest
                 */
                DeleteOperationRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.DeleteOperationRequest)
                        return object;
                    var message = new $root.google.longrunning.DeleteOperationRequest();
                    if (object.name != null)
                        message.name = String(object.name);
                    return message;
                };
    
                /**
                 * Creates a plain object from a DeleteOperationRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {google.longrunning.DeleteOperationRequest} message DeleteOperationRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                DeleteOperationRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults)
                        object.name = "";
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    return object;
                };
    
                /**
                 * Converts this DeleteOperationRequest to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                DeleteOperationRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for DeleteOperationRequest
                 * @function getTypeUrl
                 * @memberof google.longrunning.DeleteOperationRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                DeleteOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.DeleteOperationRequest";
                };
    
                return DeleteOperationRequest;
            })();
    
            longrunning.WaitOperationRequest = (function() {
    
                /**
                 * Properties of a WaitOperationRequest.
                 * @memberof google.longrunning
                 * @interface IWaitOperationRequest
                 * @property {string|null} [name] WaitOperationRequest name
                 * @property {google.protobuf.IDuration|null} [timeout] WaitOperationRequest timeout
                 */
    
                /**
                 * Constructs a new WaitOperationRequest.
                 * @memberof google.longrunning
                 * @classdesc Represents a WaitOperationRequest.
                 * @implements IWaitOperationRequest
                 * @constructor
                 * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
                 */
                function WaitOperationRequest(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * WaitOperationRequest name.
                 * @member {string} name
                 * @memberof google.longrunning.WaitOperationRequest
                 * @instance
                 */
                WaitOperationRequest.prototype.name = "";
    
                /**
                 * WaitOperationRequest timeout.
                 * @member {google.protobuf.IDuration|null|undefined} timeout
                 * @memberof google.longrunning.WaitOperationRequest
                 * @instance
                 */
                WaitOperationRequest.prototype.timeout = null;
    
                /**
                 * Creates a new WaitOperationRequest instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {google.longrunning.IWaitOperationRequest=} [properties] Properties to set
                 * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest instance
                 */
                WaitOperationRequest.create = function create(properties) {
                    return new WaitOperationRequest(properties);
                };
    
                /**
                 * Encodes the specified WaitOperationRequest message. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                WaitOperationRequest.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
                    if (message.timeout != null && Object.hasOwnProperty.call(message, "timeout"))
                        $root.google.protobuf.Duration.encode(message.timeout, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified WaitOperationRequest message, length delimited. Does not implicitly {@link google.longrunning.WaitOperationRequest.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {google.longrunning.IWaitOperationRequest} message WaitOperationRequest message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                WaitOperationRequest.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a WaitOperationRequest message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                WaitOperationRequest.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.WaitOperationRequest();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.name = reader.string();
                                break;
                            }
                        case 2: {
                                message.timeout = $root.google.protobuf.Duration.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a WaitOperationRequest message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                WaitOperationRequest.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a WaitOperationRequest message.
                 * @function verify
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                WaitOperationRequest.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.name != null && message.hasOwnProperty("name"))
                        if (!$util.isString(message.name))
                            return "name: string expected";
                    if (message.timeout != null && message.hasOwnProperty("timeout")) {
                        var error = $root.google.protobuf.Duration.verify(message.timeout);
                        if (error)
                            return "timeout." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a WaitOperationRequest message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.WaitOperationRequest} WaitOperationRequest
                 */
                WaitOperationRequest.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.WaitOperationRequest)
                        return object;
                    var message = new $root.google.longrunning.WaitOperationRequest();
                    if (object.name != null)
                        message.name = String(object.name);
                    if (object.timeout != null) {
                        if (typeof object.timeout !== "object")
                            throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");
                        message.timeout = $root.google.protobuf.Duration.fromObject(object.timeout);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a WaitOperationRequest message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {google.longrunning.WaitOperationRequest} message WaitOperationRequest
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                WaitOperationRequest.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.name = "";
                        object.timeout = null;
                    }
                    if (message.name != null && message.hasOwnProperty("name"))
                        object.name = message.name;
                    if (message.timeout != null && message.hasOwnProperty("timeout"))
                        object.timeout = $root.google.protobuf.Duration.toObject(message.timeout, options);
                    return object;
                };
    
                /**
                 * Converts this WaitOperationRequest to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.WaitOperationRequest
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                WaitOperationRequest.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for WaitOperationRequest
                 * @function getTypeUrl
                 * @memberof google.longrunning.WaitOperationRequest
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                WaitOperationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.WaitOperationRequest";
                };
    
                return WaitOperationRequest;
            })();
    
            longrunning.OperationInfo = (function() {
    
                /**
                 * Properties of an OperationInfo.
                 * @memberof google.longrunning
                 * @interface IOperationInfo
                 * @property {string|null} [responseType] OperationInfo responseType
                 * @property {string|null} [metadataType] OperationInfo metadataType
                 */
    
                /**
                 * Constructs a new OperationInfo.
                 * @memberof google.longrunning
                 * @classdesc Represents an OperationInfo.
                 * @implements IOperationInfo
                 * @constructor
                 * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
                 */
                function OperationInfo(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * OperationInfo responseType.
                 * @member {string} responseType
                 * @memberof google.longrunning.OperationInfo
                 * @instance
                 */
                OperationInfo.prototype.responseType = "";
    
                /**
                 * OperationInfo metadataType.
                 * @member {string} metadataType
                 * @memberof google.longrunning.OperationInfo
                 * @instance
                 */
                OperationInfo.prototype.metadataType = "";
    
                /**
                 * Creates a new OperationInfo instance using the specified properties.
                 * @function create
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {google.longrunning.IOperationInfo=} [properties] Properties to set
                 * @returns {google.longrunning.OperationInfo} OperationInfo instance
                 */
                OperationInfo.create = function create(properties) {
                    return new OperationInfo(properties);
                };
    
                /**
                 * Encodes the specified OperationInfo message. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
                 * @function encode
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OperationInfo.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.responseType != null && Object.hasOwnProperty.call(message, "responseType"))
                        writer.uint32(/* id 1, wireType 2 =*/10).string(message.responseType);
                    if (message.metadataType != null && Object.hasOwnProperty.call(message, "metadataType"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.metadataType);
                    return writer;
                };
    
                /**
                 * Encodes the specified OperationInfo message, length delimited. Does not implicitly {@link google.longrunning.OperationInfo.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {google.longrunning.IOperationInfo} message OperationInfo message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                OperationInfo.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes an OperationInfo message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.longrunning.OperationInfo} OperationInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OperationInfo.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.longrunning.OperationInfo();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.responseType = reader.string();
                                break;
                            }
                        case 2: {
                                message.metadataType = reader.string();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes an OperationInfo message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.longrunning.OperationInfo} OperationInfo
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                OperationInfo.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies an OperationInfo message.
                 * @function verify
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                OperationInfo.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.responseType != null && message.hasOwnProperty("responseType"))
                        if (!$util.isString(message.responseType))
                            return "responseType: string expected";
                    if (message.metadataType != null && message.hasOwnProperty("metadataType"))
                        if (!$util.isString(message.metadataType))
                            return "metadataType: string expected";
                    return null;
                };
    
                /**
                 * Creates an OperationInfo message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.longrunning.OperationInfo} OperationInfo
                 */
                OperationInfo.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.longrunning.OperationInfo)
                        return object;
                    var message = new $root.google.longrunning.OperationInfo();
                    if (object.responseType != null)
                        message.responseType = String(object.responseType);
                    if (object.metadataType != null)
                        message.metadataType = String(object.metadataType);
                    return message;
                };
    
                /**
                 * Creates a plain object from an OperationInfo message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {google.longrunning.OperationInfo} message OperationInfo
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                OperationInfo.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.responseType = "";
                        object.metadataType = "";
                    }
                    if (message.responseType != null && message.hasOwnProperty("responseType"))
                        object.responseType = message.responseType;
                    if (message.metadataType != null && message.hasOwnProperty("metadataType"))
                        object.metadataType = message.metadataType;
                    return object;
                };
    
                /**
                 * Converts this OperationInfo to JSON.
                 * @function toJSON
                 * @memberof google.longrunning.OperationInfo
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                OperationInfo.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for OperationInfo
                 * @function getTypeUrl
                 * @memberof google.longrunning.OperationInfo
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                OperationInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.longrunning.OperationInfo";
                };
    
                return OperationInfo;
            })();
    
            return longrunning;
        })();
    
        google.rpc = (function() {
    
            /**
             * Namespace rpc.
             * @memberof google
             * @namespace
             */
            var rpc = {};
    
            rpc.Status = (function() {
    
                /**
                 * Properties of a Status.
                 * @memberof google.rpc
                 * @interface IStatus
                 * @property {number|null} [code] Status code
                 * @property {string|null} [message] Status message
                 * @property {Array.<google.protobuf.IAny>|null} [details] Status details
                 */
    
                /**
                 * Constructs a new Status.
                 * @memberof google.rpc
                 * @classdesc Represents a Status.
                 * @implements IStatus
                 * @constructor
                 * @param {google.rpc.IStatus=} [properties] Properties to set
                 */
                function Status(properties) {
                    this.details = [];
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Status code.
                 * @member {number} code
                 * @memberof google.rpc.Status
                 * @instance
                 */
                Status.prototype.code = 0;
    
                /**
                 * Status message.
                 * @member {string} message
                 * @memberof google.rpc.Status
                 * @instance
                 */
                Status.prototype.message = "";
    
                /**
                 * Status details.
                 * @member {Array.<google.protobuf.IAny>} details
                 * @memberof google.rpc.Status
                 * @instance
                 */
                Status.prototype.details = $util.emptyArray;
    
                /**
                 * Creates a new Status instance using the specified properties.
                 * @function create
                 * @memberof google.rpc.Status
                 * @static
                 * @param {google.rpc.IStatus=} [properties] Properties to set
                 * @returns {google.rpc.Status} Status instance
                 */
                Status.create = function create(properties) {
                    return new Status(properties);
                };
    
                /**
                 * Encodes the specified Status message. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
                 * @function encode
                 * @memberof google.rpc.Status
                 * @static
                 * @param {google.rpc.IStatus} message Status message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Status.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.code != null && Object.hasOwnProperty.call(message, "code"))
                        writer.uint32(/* id 1, wireType 0 =*/8).int32(message.code);
                    if (message.message != null && Object.hasOwnProperty.call(message, "message"))
                        writer.uint32(/* id 2, wireType 2 =*/18).string(message.message);
                    if (message.details != null && message.details.length)
                        for (var i = 0; i < message.details.length; ++i)
                            $root.google.protobuf.Any.encode(message.details[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified Status message, length delimited. Does not implicitly {@link google.rpc.Status.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.rpc.Status
                 * @static
                 * @param {google.rpc.IStatus} message Status message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Status.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Status message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.rpc.Status
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.rpc.Status} Status
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Status.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Status();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.code = reader.int32();
                                break;
                            }
                        case 2: {
                                message.message = reader.string();
                                break;
                            }
                        case 3: {
                                if (!(message.details && message.details.length))
                                    message.details = [];
                                message.details.push($root.google.protobuf.Any.decode(reader, reader.uint32()));
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Status message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.rpc.Status
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.rpc.Status} Status
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Status.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Status message.
                 * @function verify
                 * @memberof google.rpc.Status
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Status.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.code != null && message.hasOwnProperty("code"))
                        if (!$util.isInteger(message.code))
                            return "code: integer expected";
                    if (message.message != null && message.hasOwnProperty("message"))
                        if (!$util.isString(message.message))
                            return "message: string expected";
                    if (message.details != null && message.hasOwnProperty("details")) {
                        if (!Array.isArray(message.details))
                            return "details: array expected";
                        for (var i = 0; i < message.details.length; ++i) {
                            var error = $root.google.protobuf.Any.verify(message.details[i]);
                            if (error)
                                return "details." + error;
                        }
                    }
                    return null;
                };
    
                /**
                 * Creates a Status message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.rpc.Status
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.rpc.Status} Status
                 */
                Status.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.rpc.Status)
                        return object;
                    var message = new $root.google.rpc.Status();
                    if (object.code != null)
                        message.code = object.code | 0;
                    if (object.message != null)
                        message.message = String(object.message);
                    if (object.details) {
                        if (!Array.isArray(object.details))
                            throw TypeError(".google.rpc.Status.details: array expected");
                        message.details = [];
                        for (var i = 0; i < object.details.length; ++i) {
                            if (typeof object.details[i] !== "object")
                                throw TypeError(".google.rpc.Status.details: object expected");
                            message.details[i] = $root.google.protobuf.Any.fromObject(object.details[i]);
                        }
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a Status message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.rpc.Status
                 * @static
                 * @param {google.rpc.Status} message Status
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Status.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.arrays || options.defaults)
                        object.details = [];
                    if (options.defaults) {
                        object.code = 0;
                        object.message = "";
                    }
                    if (message.code != null && message.hasOwnProperty("code"))
                        object.code = message.code;
                    if (message.message != null && message.hasOwnProperty("message"))
                        object.message = message.message;
                    if (message.details && message.details.length) {
                        object.details = [];
                        for (var j = 0; j < message.details.length; ++j)
                            object.details[j] = $root.google.protobuf.Any.toObject(message.details[j], options);
                    }
                    return object;
                };
    
                /**
                 * Converts this Status to JSON.
                 * @function toJSON
                 * @memberof google.rpc.Status
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Status.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Status
                 * @function getTypeUrl
                 * @memberof google.rpc.Status
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Status.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.rpc.Status";
                };
    
                return Status;
            })();
    
            return rpc;
        })();
    
        google.type = (function() {
    
            /**
             * Namespace type.
             * @memberof google
             * @namespace
             */
            var type = {};
    
            type.Color = (function() {
    
                /**
                 * Properties of a Color.
                 * @memberof google.type
                 * @interface IColor
                 * @property {number|null} [red] Color red
                 * @property {number|null} [green] Color green
                 * @property {number|null} [blue] Color blue
                 * @property {google.protobuf.IFloatValue|null} [alpha] Color alpha
                 */
    
                /**
                 * Constructs a new Color.
                 * @memberof google.type
                 * @classdesc Represents a Color.
                 * @implements IColor
                 * @constructor
                 * @param {google.type.IColor=} [properties] Properties to set
                 */
                function Color(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * Color red.
                 * @member {number} red
                 * @memberof google.type.Color
                 * @instance
                 */
                Color.prototype.red = 0;
    
                /**
                 * Color green.
                 * @member {number} green
                 * @memberof google.type.Color
                 * @instance
                 */
                Color.prototype.green = 0;
    
                /**
                 * Color blue.
                 * @member {number} blue
                 * @memberof google.type.Color
                 * @instance
                 */
                Color.prototype.blue = 0;
    
                /**
                 * Color alpha.
                 * @member {google.protobuf.IFloatValue|null|undefined} alpha
                 * @memberof google.type.Color
                 * @instance
                 */
                Color.prototype.alpha = null;
    
                /**
                 * Creates a new Color instance using the specified properties.
                 * @function create
                 * @memberof google.type.Color
                 * @static
                 * @param {google.type.IColor=} [properties] Properties to set
                 * @returns {google.type.Color} Color instance
                 */
                Color.create = function create(properties) {
                    return new Color(properties);
                };
    
                /**
                 * Encodes the specified Color message. Does not implicitly {@link google.type.Color.verify|verify} messages.
                 * @function encode
                 * @memberof google.type.Color
                 * @static
                 * @param {google.type.IColor} message Color message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Color.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.red != null && Object.hasOwnProperty.call(message, "red"))
                        writer.uint32(/* id 1, wireType 5 =*/13).float(message.red);
                    if (message.green != null && Object.hasOwnProperty.call(message, "green"))
                        writer.uint32(/* id 2, wireType 5 =*/21).float(message.green);
                    if (message.blue != null && Object.hasOwnProperty.call(message, "blue"))
                        writer.uint32(/* id 3, wireType 5 =*/29).float(message.blue);
                    if (message.alpha != null && Object.hasOwnProperty.call(message, "alpha"))
                        $root.google.protobuf.FloatValue.encode(message.alpha, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
                    return writer;
                };
    
                /**
                 * Encodes the specified Color message, length delimited. Does not implicitly {@link google.type.Color.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.type.Color
                 * @static
                 * @param {google.type.IColor} message Color message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                Color.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a Color message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.type.Color
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.type.Color} Color
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Color.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.Color();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.red = reader.float();
                                break;
                            }
                        case 2: {
                                message.green = reader.float();
                                break;
                            }
                        case 3: {
                                message.blue = reader.float();
                                break;
                            }
                        case 4: {
                                message.alpha = $root.google.protobuf.FloatValue.decode(reader, reader.uint32());
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a Color message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.type.Color
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.type.Color} Color
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                Color.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a Color message.
                 * @function verify
                 * @memberof google.type.Color
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                Color.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.red != null && message.hasOwnProperty("red"))
                        if (typeof message.red !== "number")
                            return "red: number expected";
                    if (message.green != null && message.hasOwnProperty("green"))
                        if (typeof message.green !== "number")
                            return "green: number expected";
                    if (message.blue != null && message.hasOwnProperty("blue"))
                        if (typeof message.blue !== "number")
                            return "blue: number expected";
                    if (message.alpha != null && message.hasOwnProperty("alpha")) {
                        var error = $root.google.protobuf.FloatValue.verify(message.alpha);
                        if (error)
                            return "alpha." + error;
                    }
                    return null;
                };
    
                /**
                 * Creates a Color message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.type.Color
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.type.Color} Color
                 */
                Color.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.type.Color)
                        return object;
                    var message = new $root.google.type.Color();
                    if (object.red != null)
                        message.red = Number(object.red);
                    if (object.green != null)
                        message.green = Number(object.green);
                    if (object.blue != null)
                        message.blue = Number(object.blue);
                    if (object.alpha != null) {
                        if (typeof object.alpha !== "object")
                            throw TypeError(".google.type.Color.alpha: object expected");
                        message.alpha = $root.google.protobuf.FloatValue.fromObject(object.alpha);
                    }
                    return message;
                };
    
                /**
                 * Creates a plain object from a Color message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.type.Color
                 * @static
                 * @param {google.type.Color} message Color
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                Color.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.red = 0;
                        object.green = 0;
                        object.blue = 0;
                        object.alpha = null;
                    }
                    if (message.red != null && message.hasOwnProperty("red"))
                        object.red = options.json && !isFinite(message.red) ? String(message.red) : message.red;
                    if (message.green != null && message.hasOwnProperty("green"))
                        object.green = options.json && !isFinite(message.green) ? String(message.green) : message.green;
                    if (message.blue != null && message.hasOwnProperty("blue"))
                        object.blue = options.json && !isFinite(message.blue) ? String(message.blue) : message.blue;
                    if (message.alpha != null && message.hasOwnProperty("alpha"))
                        object.alpha = $root.google.protobuf.FloatValue.toObject(message.alpha, options);
                    return object;
                };
    
                /**
                 * Converts this Color to JSON.
                 * @function toJSON
                 * @memberof google.type.Color
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                Color.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for Color
                 * @function getTypeUrl
                 * @memberof google.type.Color
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                Color.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.type.Color";
                };
    
                return Color;
            })();
    
            type.LatLng = (function() {
    
                /**
                 * Properties of a LatLng.
                 * @memberof google.type
                 * @interface ILatLng
                 * @property {number|null} [latitude] LatLng latitude
                 * @property {number|null} [longitude] LatLng longitude
                 */
    
                /**
                 * Constructs a new LatLng.
                 * @memberof google.type
                 * @classdesc Represents a LatLng.
                 * @implements ILatLng
                 * @constructor
                 * @param {google.type.ILatLng=} [properties] Properties to set
                 */
                function LatLng(properties) {
                    if (properties)
                        for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                            if (properties[keys[i]] != null)
                                this[keys[i]] = properties[keys[i]];
                }
    
                /**
                 * LatLng latitude.
                 * @member {number} latitude
                 * @memberof google.type.LatLng
                 * @instance
                 */
                LatLng.prototype.latitude = 0;
    
                /**
                 * LatLng longitude.
                 * @member {number} longitude
                 * @memberof google.type.LatLng
                 * @instance
                 */
                LatLng.prototype.longitude = 0;
    
                /**
                 * Creates a new LatLng instance using the specified properties.
                 * @function create
                 * @memberof google.type.LatLng
                 * @static
                 * @param {google.type.ILatLng=} [properties] Properties to set
                 * @returns {google.type.LatLng} LatLng instance
                 */
                LatLng.create = function create(properties) {
                    return new LatLng(properties);
                };
    
                /**
                 * Encodes the specified LatLng message. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
                 * @function encode
                 * @memberof google.type.LatLng
                 * @static
                 * @param {google.type.ILatLng} message LatLng message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LatLng.encode = function encode(message, writer) {
                    if (!writer)
                        writer = $Writer.create();
                    if (message.latitude != null && Object.hasOwnProperty.call(message, "latitude"))
                        writer.uint32(/* id 1, wireType 1 =*/9).double(message.latitude);
                    if (message.longitude != null && Object.hasOwnProperty.call(message, "longitude"))
                        writer.uint32(/* id 2, wireType 1 =*/17).double(message.longitude);
                    return writer;
                };
    
                /**
                 * Encodes the specified LatLng message, length delimited. Does not implicitly {@link google.type.LatLng.verify|verify} messages.
                 * @function encodeDelimited
                 * @memberof google.type.LatLng
                 * @static
                 * @param {google.type.ILatLng} message LatLng message or plain object to encode
                 * @param {$protobuf.Writer} [writer] Writer to encode to
                 * @returns {$protobuf.Writer} Writer
                 */
                LatLng.encodeDelimited = function encodeDelimited(message, writer) {
                    return this.encode(message, writer).ldelim();
                };
    
                /**
                 * Decodes a LatLng message from the specified reader or buffer.
                 * @function decode
                 * @memberof google.type.LatLng
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @param {number} [length] Message length if known beforehand
                 * @returns {google.type.LatLng} LatLng
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LatLng.decode = function decode(reader, length) {
                    if (!(reader instanceof $Reader))
                        reader = $Reader.create(reader);
                    var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.type.LatLng();
                    while (reader.pos < end) {
                        var tag = reader.uint32();
                        switch (tag >>> 3) {
                        case 1: {
                                message.latitude = reader.double();
                                break;
                            }
                        case 2: {
                                message.longitude = reader.double();
                                break;
                            }
                        default:
                            reader.skipType(tag & 7);
                            break;
                        }
                    }
                    return message;
                };
    
                /**
                 * Decodes a LatLng message from the specified reader or buffer, length delimited.
                 * @function decodeDelimited
                 * @memberof google.type.LatLng
                 * @static
                 * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
                 * @returns {google.type.LatLng} LatLng
                 * @throws {Error} If the payload is not a reader or valid buffer
                 * @throws {$protobuf.util.ProtocolError} If required fields are missing
                 */
                LatLng.decodeDelimited = function decodeDelimited(reader) {
                    if (!(reader instanceof $Reader))
                        reader = new $Reader(reader);
                    return this.decode(reader, reader.uint32());
                };
    
                /**
                 * Verifies a LatLng message.
                 * @function verify
                 * @memberof google.type.LatLng
                 * @static
                 * @param {Object.<string,*>} message Plain object to verify
                 * @returns {string|null} `null` if valid, otherwise the reason why it is not
                 */
                LatLng.verify = function verify(message) {
                    if (typeof message !== "object" || message === null)
                        return "object expected";
                    if (message.latitude != null && message.hasOwnProperty("latitude"))
                        if (typeof message.latitude !== "number")
                            return "latitude: number expected";
                    if (message.longitude != null && message.hasOwnProperty("longitude"))
                        if (typeof message.longitude !== "number")
                            return "longitude: number expected";
                    return null;
                };
    
                /**
                 * Creates a LatLng message from a plain object. Also converts values to their respective internal types.
                 * @function fromObject
                 * @memberof google.type.LatLng
                 * @static
                 * @param {Object.<string,*>} object Plain object
                 * @returns {google.type.LatLng} LatLng
                 */
                LatLng.fromObject = function fromObject(object) {
                    if (object instanceof $root.google.type.LatLng)
                        return object;
                    var message = new $root.google.type.LatLng();
                    if (object.latitude != null)
                        message.latitude = Number(object.latitude);
                    if (object.longitude != null)
                        message.longitude = Number(object.longitude);
                    return message;
                };
    
                /**
                 * Creates a plain object from a LatLng message. Also converts values to other types if specified.
                 * @function toObject
                 * @memberof google.type.LatLng
                 * @static
                 * @param {google.type.LatLng} message LatLng
                 * @param {$protobuf.IConversionOptions} [options] Conversion options
                 * @returns {Object.<string,*>} Plain object
                 */
                LatLng.toObject = function toObject(message, options) {
                    if (!options)
                        options = {};
                    var object = {};
                    if (options.defaults) {
                        object.latitude = 0;
                        object.longitude = 0;
                    }
                    if (message.latitude != null && message.hasOwnProperty("latitude"))
                        object.latitude = options.json && !isFinite(message.latitude) ? String(message.latitude) : message.latitude;
                    if (message.longitude != null && message.hasOwnProperty("longitude"))
                        object.longitude = options.json && !isFinite(message.longitude) ? String(message.longitude) : message.longitude;
                    return object;
                };
    
                /**
                 * Converts this LatLng to JSON.
                 * @function toJSON
                 * @memberof google.type.LatLng
                 * @instance
                 * @returns {Object.<string,*>} JSON object
                 */
                LatLng.prototype.toJSON = function toJSON() {
                    return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
                };
    
                /**
                 * Gets the default type url for LatLng
                 * @function getTypeUrl
                 * @memberof google.type.LatLng
                 * @static
                 * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com")
                 * @returns {string} The default type url
                 */
                LatLng.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
                    if (typeUrlPrefix === undefined) {
                        typeUrlPrefix = "type.googleapis.com";
                    }
                    return typeUrlPrefix + "/google.type.LatLng";
                };
    
                return LatLng;
            })();
    
            return type;
        })();
    
        return google;
    })();

    return $root;
});
